Salome HOME
Regression correction: enter processing in Parameter feature. Feature wasn't commited...
authornds <nds@opencascade.com>
Fri, 22 Jan 2016 11:34:56 +0000 (14:34 +0300)
committerdbv <dbv@opencascade.com>
Tue, 16 Feb 2016 14:04:28 +0000 (17:04 +0300)
src/ModuleBase/ModuleBase_IPropertyPanel.h
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_WidgetExprEditor.cpp
src/ModuleBase/ModuleBase_WidgetExprEditor.h
src/XGUI/XGUI_OperationMgr.h
src/XGUI/XGUI_PropertyPanel.cpp
src/XGUI/XGUI_Workshop.cpp

index b5b302d2232d963d9d16b5fcb9b74a09bbe9afa0..c9f51e1224e2ba79976de4aab0f46f8c9facc9b1 100644 (file)
@@ -75,8 +75,9 @@ public:
 
 signals:
   /// The signal about key release on the control, that corresponds to the attribute
+  /// \param theObject a sender of the event
   /// \param theEvent key release event
-  void keyReleased(QKeyEvent* theEvent);
+  void keyReleased(QObject* theObject, QKeyEvent* theEvent);
 
   /// The signal about the widget activation
   /// \param theWidget the activated widget
index 79e4b1e1737a7b6831c881bdebbd3312ae3ef432..35042a6458f6741b988ea49835e2a602c2e4328d 100644 (file)
@@ -213,8 +213,9 @@ signals:
   void afterValuesRestored();
 
   /// The signal about key release on the control, that corresponds to the attribute
+  /// \param theObject a sender of the event
   /// \param theEvent key release event
-  void keyReleased(QKeyEvent* theEvent);
+  void keyReleased(QObject* theObject, QKeyEvent* theEvent);
 
   /// The signal is emitted if the enter is clicked in the control of the widget
   void enterClicked();
index c0e683f89751ae8fd1da7e52c00b5059919ba923..2900b1eb9c413803b8d1e3e7eebc356381e851f8 100644 (file)
@@ -135,7 +135,7 @@ void ExpressionEditor::keyPressEvent(QKeyEvent* theEvent)
     switch (theEvent->key()) {
       case Qt::Key_Enter:
       case Qt::Key_Return:
-        emit keyReleased(theEvent);
+        emit keyReleased(this, theEvent);
         // do not react to the Enter key, the property panel processes it
         return;
       break;
@@ -228,7 +228,8 @@ ModuleBase_WidgetExprEditor::ModuleBase_WidgetExprEditor( QWidget* theParent,
   this->setLayout(aMainLay);
 
   connect(myEditor, SIGNAL(valueModified()), this, SIGNAL(valuesModified()));
-  connect(myEditor, SIGNAL(keyReleased(QKeyEvent*)), this, SIGNAL(keyReleased(QKeyEvent*)));
+  connect(myEditor, SIGNAL(keyReleased(QObject*, QKeyEvent*)),
+          this, SIGNAL(keyReleased(QObject*, QKeyEvent*)));
 }
 
 ModuleBase_WidgetExprEditor::~ModuleBase_WidgetExprEditor()
index b7af4cfb557921d7da86b7bf1c673ee957f1fe77..6e9941cf0d3f84860d43a1316e44d280f257014d 100644 (file)
@@ -62,8 +62,9 @@ signals:
   void valueModified();
 
   /// The signal about key release on the control, that corresponds to the attribute
+  /// \param theObject a sender of the event
   /// \param theEvent key release event
-  void keyReleased(QKeyEvent* theEvent);
+  void keyReleased(QObject* theObject, QKeyEvent* theEvent);
 
  protected:
   /// Perform completion by prefix
index 1453bf762e76443f3a36400d6c1c5e7e829861a7..1b345039771f98b2188a779164764f2001f3cdc5 100755 (executable)
@@ -80,6 +80,7 @@ Q_OBJECT
   ModuleBase_Operation* previousOperation(ModuleBase_Operation* theOperation) const;
 
   /// Redefinition of virtual function
+  /// \param theObject a sender of the event
   virtual bool eventFilter(QObject *theObject, QEvent *theEvent);
 
   /// Start the operation and append it to the stack of operations
@@ -159,8 +160,8 @@ protected: // TEMPORARY
 
  public slots:
   /// SLOT, that is called by the key in the property panel is clicked.
-  /// \param theEvent the mouse event
   /// \param theObject a sender of the event
+  /// \param theEvent the mouse event
   bool onKeyReleased(QObject *theObject, QKeyEvent* theEvent);
 
   /// The functionaly, that should be done by delete click
index 2ebf8973f72d2e5e922eab8d92f87f8281bd8f07..12d5cc63db4f1fbc8a8df344139f0fb904752914 100755 (executable)
@@ -121,8 +121,8 @@ void XGUI_PropertyPanel::setModelWidgets(const QList<ModuleBase_ModelWidget*>& t
             this,    SLOT(activateWidget(ModuleBase_ModelWidget*)));
     connect(aWidget, SIGNAL(focusOutWidget(ModuleBase_ModelWidget*)),
             this,    SLOT(onActivateNextWidget(ModuleBase_ModelWidget*)));
-    connect(aWidget, SIGNAL(keyReleased(QKeyEvent*)),
-            this,    SIGNAL(keyReleased(QKeyEvent*)));
+    connect(aWidget, SIGNAL(keyReleased(QObject*, QKeyEvent*)),
+            this,    SIGNAL(keyReleased(QObject*, QKeyEvent*)));
     connect(aWidget, SIGNAL(enterClicked()),
             this,    SIGNAL(enterClicked()));
 
index 754778afe4d78e018e07881bd554d44e57e2c1d1..7f432db6b281a32cb3650905b2079edf57217472 100755 (executable)
@@ -1060,8 +1060,8 @@ void XGUI_Workshop::createDockWidgets()
 
   QAction* aCancelAct = myActionsMgr->operationStateAction(XGUI_ActionsMgr::Abort);
   connect(aCancelAct, SIGNAL(triggered()), myOperationMgr, SLOT(onAbortOperation()));
-  connect(myPropertyPanel, SIGNAL(keyReleased(QKeyEvent*)),
-          myOperationMgr,  SLOT(onKeyReleased(QKeyEvent*)));
+  connect(myPropertyPanel, SIGNAL(keyReleased(QObject*, QKeyEvent*)),
+          myOperationMgr,  SLOT(onKeyReleased(QObject*, QKeyEvent*)));
 
   connect(myPropertyPanel, SIGNAL(enterClicked()),
           myOperationMgr,  SLOT(onProcessEnter()));