Skip to content

Commit dd61e4b

Browse files
authored
Reorder QRegExpValidator creation (#100)
1 parent a3121bd commit dd61e4b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bt_editor/custom_node_dialog.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ CustomNodeDialog::CustomNodeDialog(const NodeModels &models,
2727
restoreGeometry(settings.value("CustomNodeDialog/geometry").toByteArray());
2828
ui->tableWidget->horizontalHeader()->restoreState( settings.value("CustomNodeDialog/header").toByteArray() );
2929

30+
QRegExp rx("\\w+");
31+
_validator = new QRegExpValidator(rx, this);
32+
3033
if( to_edit.isEmpty() == false)
3134
{
3235
auto model_it = models.find(to_edit);
@@ -88,10 +91,6 @@ CustomNodeDialog::CustomNodeDialog(const NodeModels &models,
8891
connect( ui->lineEdit, &QLineEdit::textChanged,
8992
this, &CustomNodeDialog::checkValid );
9093

91-
QRegExp rx("\\w+");
92-
_validator = new QRegExpValidator(rx, this);
93-
94-
9594
checkValid();
9695
}
9796

0 commit comments

Comments
 (0)