Salome HOME
It removes commented not used code.
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetExprEditor.cpp
index 431a387f8d69c83bae09a9b73db7db1ad61b6e77..c0e683f89751ae8fd1da7e52c00b5059919ba923 100644 (file)
@@ -36,7 +36,7 @@
 #include <string>
 
 ExpressionEditor::ExpressionEditor(QWidget* theParent)
-: QPlainTextEdit(theParent), myCompletedAndSelected(false), myIsModified(false)
+: QPlainTextEdit(theParent), myCompletedAndSelected(false)
 {
   myCompleter = new QCompleter(this);
   myCompleter->setWidget(this);
@@ -114,8 +114,6 @@ void ExpressionEditor::performCompletion(const QString& theCompletionPrefix)
 
 void ExpressionEditor::keyPressEvent(QKeyEvent* theEvent)
 {
-  bool anIsModified = myIsModified;
-
   if (myCompletedAndSelected && handledCompletedAndSelected(theEvent))
     return;
   myCompletedAndSelected = false;
@@ -173,16 +171,6 @@ QString ExpressionEditor::placeHolderText() const
   return myPlaceHolderText;
 }
 
-bool ExpressionEditor::isModified() const
-{
-  return myIsModified;
-}
-
-void ExpressionEditor::clearModified()
-{
-  myIsModified = false;
-}
-
 void ExpressionEditor::paintEvent( QPaintEvent* theEvent )
 {
   QPlainTextEdit::paintEvent( theEvent );
@@ -214,7 +202,6 @@ void ExpressionEditor::paintEvent( QPaintEvent* theEvent )
 
 void ExpressionEditor::onTextChanged()
 {
-  myIsModified = true;
   emit valueModified();
 }
 
@@ -314,11 +301,9 @@ QList<QWidget*> ModuleBase_WidgetExprEditor::getControls() const
 
 bool ModuleBase_WidgetExprEditor::processEnter()
 {
-  //bool isModified = myEditor->isModified();
   bool isModified = getValueState() == ModifiedInPP;
   if (isModified) {
     emit valuesChanged();
-    //myEditor->clearModified();
     myEditor->selectAll();
   }
   return isModified;