From 9d14b087b75675fb8b196a401296884171f274fc Mon Sep 17 00:00:00 2001 From: Sarathkrishnan Ramesh Date: Tue, 29 Sep 2020 13:02:08 +0530 Subject: [PATCH] Reorder QRegExpValidator creation --- bt_editor/custom_node_dialog.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bt_editor/custom_node_dialog.cpp b/bt_editor/custom_node_dialog.cpp index 47903d88..74ddd6d5 100644 --- a/bt_editor/custom_node_dialog.cpp +++ b/bt_editor/custom_node_dialog.cpp @@ -27,6 +27,9 @@ CustomNodeDialog::CustomNodeDialog(const NodeModels &models, restoreGeometry(settings.value("CustomNodeDialog/geometry").toByteArray()); ui->tableWidget->horizontalHeader()->restoreState( settings.value("CustomNodeDialog/header").toByteArray() ); + QRegExp rx("\\w+"); + _validator = new QRegExpValidator(rx, this); + if( to_edit.isEmpty() == false) { auto model_it = models.find(to_edit); @@ -88,10 +91,6 @@ CustomNodeDialog::CustomNodeDialog(const NodeModels &models, connect( ui->lineEdit, &QLineEdit::textChanged, this, &CustomNodeDialog::checkValid ); - QRegExp rx("\\w+"); - _validator = new QRegExpValidator(rx, this); - - checkValid(); }