Salome HOME
Process enter key by Point input widget
authorvsv <vsv@opencascade.com>
Tue, 28 Aug 2018 13:41:46 +0000 (16:41 +0300)
committervsv <vsv@opencascade.com>
Tue, 28 Aug 2018 13:41:46 +0000 (16:41 +0300)
src/ModuleBase/ModuleBase_WidgetPointInput.cpp
src/ModuleBase/ModuleBase_WidgetPointInput.h

index 9b225ef786668b75b6ea120888cf8dbf1b2bbed2..7917a909ac9c7fc49144e258ce9e249671b8da78 100644 (file)
@@ -191,3 +191,13 @@ bool ModuleBase_WidgetPointInput
   }
   return false;
 }
+
+//********************************************************************
+bool ModuleBase_WidgetPointInput::processEnter()
+{
+  bool isModified = getValueState() == ModifiedInPP;
+  if (isModified) {
+    emit valuesChanged();
+  }
+  return isModified;
+}
index d0e9c790d3cb259038f6ad881d60d923a033ca4b..7b6ec3b5940a3adef891f31494aa4b04a628f8e5 100644 (file)
@@ -68,6 +68,9 @@ protected:
   /// \return a list of shapes
   virtual QIntList shapeTypes() const;
 
+  /// Returns true if the event is processed.
+  virtual bool processEnter();
+
 protected:
   ModuleBase_ParamSpinBox* myXSpin;
   ModuleBase_ParamSpinBox* myYSpin;