From: spo Date: Tue, 17 Nov 2015 14:36:06 +0000 (+0300) Subject: Issue #1083: errors in parameter X-Git-Tag: V_2.0.0~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b2ca24e7ae7220b3b89c91aed6083accea56314f;p=modules%2Fshaper.git Issue #1083: errors in parameter --- diff --git a/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp b/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp index defdbee48..7f7e187b8 100644 --- a/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp +++ b/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp @@ -99,7 +99,7 @@ ModuleBase_WidgetLineEdit::ModuleBase_WidgetLineEdit(QWidget* theParent, aMainLay->addRow(aLabel, myLineEdit); this->setLayout(aMainLay); - connect(myLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged())); + connect(myLineEdit, SIGNAL(textChanged(const QString&)), this, SIGNAL(valuesModified())); } ModuleBase_WidgetLineEdit::~ModuleBase_WidgetLineEdit() @@ -141,7 +141,12 @@ QList ModuleBase_WidgetLineEdit::getControls() const return result; } -void ModuleBase_WidgetLineEdit::onTextChanged() +bool ModuleBase_WidgetLineEdit::processEnter() { - storeValue(); + bool isModified = getValueState() == ModifiedInPP; + if (isModified) { + emit valuesChanged(); + myLineEdit->selectAll(); + } + return isModified; } diff --git a/src/ModuleBase/ModuleBase_WidgetLineEdit.h b/src/ModuleBase/ModuleBase_WidgetLineEdit.h index 1f5f3fd71..5b6b22e57 100644 --- a/src/ModuleBase/ModuleBase_WidgetLineEdit.h +++ b/src/ModuleBase/ModuleBase_WidgetLineEdit.h @@ -43,9 +43,8 @@ class MODULEBASE_EXPORT ModuleBase_WidgetLineEdit : public ModuleBase_ModelWidge /// Redefinition of virtual method virtual QList getControls() const; - public slots: - /// A slot for processing text changed event - void onTextChanged(); + /// Returns true if the event is processed. + virtual bool processEnter(); protected: /// Saves the internal parameters to the given feature