From 03b06af2c228115f9233d0c2b2d2503f1c44f18b Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 3 Feb 2016 14:11:57 +0300 Subject: [PATCH] Correction of a distance restart operation. --- src/ModuleBase/ModuleBase_ModelWidget.h | 3 ++- src/ModuleBase/ModuleBase_WidgetEditor.cpp | 2 +- src/XGUI/XGUI_PropertyPanel.cpp | 4 ++-- src/XGUI/XGUI_PropertyPanel.h | 4 +++- src/XGUI/XGUI_Workshop.cpp | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index 35042a645..8d6b0be3b 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -218,7 +218,8 @@ signals: void keyReleased(QObject* theObject, QKeyEvent* theEvent); /// The signal is emitted if the enter is clicked in the control of the widget - void enterClicked(); + /// \param theObject a sender of the event + void enterClicked(QObject* theObject); /// The signal about the widget is get focus /// \param theWidget the model base widget diff --git a/src/ModuleBase/ModuleBase_WidgetEditor.cpp b/src/ModuleBase/ModuleBase_WidgetEditor.cpp index aa4cd79b7..08086481b 100644 --- a/src/ModuleBase/ModuleBase_WidgetEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetEditor.cpp @@ -128,7 +128,7 @@ void ModuleBase_WidgetEditor::showPopupEditor(const bool theSendSignals) //if (myIsEnterPressedEmitted) if (!myIsEditing) - emit enterClicked(); + emit enterClicked(this); } else storeValue(); diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 12d5cc63d..14add657f 100755 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -123,8 +123,8 @@ void XGUI_PropertyPanel::setModelWidgets(const QList& t this, SLOT(onActivateNextWidget(ModuleBase_ModelWidget*))); connect(aWidget, SIGNAL(keyReleased(QObject*, QKeyEvent*)), this, SIGNAL(keyReleased(QObject*, QKeyEvent*))); - connect(aWidget, SIGNAL(enterClicked()), - this, SIGNAL(enterClicked())); + connect(aWidget, SIGNAL(enterClicked(QObject*)), + this, SIGNAL(enterClicked(QObject*))); } } diff --git a/src/XGUI/XGUI_PropertyPanel.h b/src/XGUI/XGUI_PropertyPanel.h index 4091de92d..958d0ae59 100644 --- a/src/XGUI/XGUI_PropertyPanel.h +++ b/src/XGUI/XGUI_PropertyPanel.h @@ -123,7 +123,9 @@ public slots: void onActivateNextWidget(ModuleBase_ModelWidget* theWidget); signals: - void enterClicked(); + /// The signal is emitted if the enter is clicked in the control of the widget + /// \param theObject a sender of the event + void enterClicked(QObject* theObject); protected: /// Makes the widget active, deactivate the previous, activate and hightlight the given one diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 071d698bb..9d9b89300 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1066,8 +1066,8 @@ void XGUI_Workshop::createDockWidgets() connect(myPropertyPanel, SIGNAL(keyReleased(QObject*, QKeyEvent*)), myOperationMgr, SLOT(onKeyReleased(QObject*, QKeyEvent*))); - connect(myPropertyPanel, SIGNAL(enterClicked()), - myOperationMgr, SLOT(onProcessEnter())); + connect(myPropertyPanel, SIGNAL(enterClicked(QObject*)), + myOperationMgr, SLOT(onProcessEnter(QObject*))); } //****************************************************** -- 2.39.2