Salome HOME
Fix Warning in NewGeom_Module.cpp
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetExprEditor.cpp
index b11bd67146184a661473321a58d4f8b0dabef582..431a387f8d69c83bae09a9b73db7db1ad61b6e77 100644 (file)
@@ -212,15 +212,6 @@ void ExpressionEditor::paintEvent( QPaintEvent* theEvent )
   }
 }
 
-bool ExpressionEditor::focusNextPrevChild(bool theIsNext)
-{
-  if (myIsModified)
-    emit editingFinished();
-  emit valueStored();
-  emit focusNextPrev();
-  return QPlainTextEdit::focusNextPrevChild(theIsNext);
-}
-
 void ExpressionEditor::onTextChanged()
 {
   myIsModified = true;
@@ -250,13 +241,7 @@ ModuleBase_WidgetExprEditor::ModuleBase_WidgetExprEditor( QWidget* theParent,
   this->setLayout(aMainLay);
 
   connect(myEditor, SIGNAL(valueModified()), this, SIGNAL(valuesModified()));
-  //connect(myEditor, SIGNAL(editingFinished()), this, SLOT(onTextChanged()));
-  connect(myEditor, SIGNAL(valueStored()), this, SLOT(onTextChanged()));
-  connect(myEditor, SIGNAL(focusNextPrev()), this, SIGNAL(focusNextPrev()));
-
   connect(myEditor, SIGNAL(keyReleased(QKeyEvent*)), this, SIGNAL(keyReleased(QKeyEvent*)));
-    /// The signal about key release on the control, that corresponds to the attribute
-  /// \param theEvent key release event
 }
 
 ModuleBase_WidgetExprEditor::~ModuleBase_WidgetExprEditor()
@@ -329,10 +314,11 @@ QList<QWidget*> ModuleBase_WidgetExprEditor::getControls() const
 
 bool ModuleBase_WidgetExprEditor::processEnter()
 {
-  bool isModified = myEditor->isModified();
+  //bool isModified = myEditor->isModified();
+  bool isModified = getValueState() == ModifiedInPP;
   if (isModified) {
     emit valuesChanged();
-    myEditor->clearModified();
+    //myEditor->clearModified();
     myEditor->selectAll();
   }
   return isModified;