From: nds Date: Fri, 22 Jan 2016 11:34:56 +0000 (+0300) Subject: Regression correction: enter processing in Parameter feature. Feature wasn't commited... X-Git-Tag: V_2.2.0~181 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4049559747c32c5ec443cf3d60501bc64a17e58a;p=modules%2Fshaper.git Regression correction: enter processing in Parameter feature. Feature wasn't commited by Enter in expression editor. --- diff --git a/src/ModuleBase/ModuleBase_IPropertyPanel.h b/src/ModuleBase/ModuleBase_IPropertyPanel.h index b5b302d22..c9f51e122 100644 --- a/src/ModuleBase/ModuleBase_IPropertyPanel.h +++ b/src/ModuleBase/ModuleBase_IPropertyPanel.h @@ -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 diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index 79e4b1e17..35042a645 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -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(); diff --git a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp index c0e683f89..2900b1eb9 100644 --- a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp @@ -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() diff --git a/src/ModuleBase/ModuleBase_WidgetExprEditor.h b/src/ModuleBase/ModuleBase_WidgetExprEditor.h index b7af4cfb5..6e9941cf0 100644 --- a/src/ModuleBase/ModuleBase_WidgetExprEditor.h +++ b/src/ModuleBase/ModuleBase_WidgetExprEditor.h @@ -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 diff --git a/src/XGUI/XGUI_OperationMgr.h b/src/XGUI/XGUI_OperationMgr.h index 1453bf762..1b3450397 100755 --- a/src/XGUI/XGUI_OperationMgr.h +++ b/src/XGUI/XGUI_OperationMgr.h @@ -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 diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 2ebf8973f..12d5cc63d 100755 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -121,8 +121,8 @@ void XGUI_PropertyPanel::setModelWidgets(const QList& 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())); diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 754778afe..7f432db6b 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -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()));