]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
There is no key release in the eventFilter() of the operation manager, so the widget...
authornds <nds@opencascade.com>
Tue, 20 Oct 2015 09:32:59 +0000 (12:32 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Wed, 21 Oct 2015 09:51:16 +0000 (12:51 +0300)
src/ModuleBase/ModuleBase_WidgetExprEditor.cpp
src/ModuleBase/ModuleBase_WidgetExprEditor.h

index 2d0e841a4a3de3273b35f17512a77e490e618d32..a7e7878e65d52e34722b4cf43f88c2a758e09006 100644 (file)
@@ -137,6 +137,7 @@ void ExpressionEditor::keyPressEvent(QKeyEvent* theEvent)
     switch (theEvent->key()) {
       case Qt::Key_Enter:
       case Qt::Key_Return:
+        emit keyReleased(theEvent);
         // do not react to the Enter key, the property panel processes it
         return;
       break;
@@ -252,6 +253,10 @@ ModuleBase_WidgetExprEditor::ModuleBase_WidgetExprEditor( QWidget* theParent,
   //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()
index 56d91029fdbd234fd962e4d109ef4c762be06266..eb2ff9aa1e1d861f68b164aa0e3efc207e30d452 100644 (file)
@@ -70,6 +70,10 @@ signals:
   void valueStored();
   void focusNextPrev();
 
+  /// The signal about key release on the control, that corresponds to the attribute
+  /// \param theEvent key release event
+  void keyReleased(QKeyEvent* theEvent);
+
  protected:
   /// Perform completion by prefix
   /// \param theCompletionPrefix a prefix for looking for completion