From: nds Date: Tue, 24 May 2016 13:19:39 +0000 (+0300) Subject: Issue #1015: The validate icon must be greyed and inactive instead of red and active X-Git-Tag: V_2.3.1~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=48bab462a416cea7ae8d6659209b8a667280cf16;p=modules%2Fshaper.git Issue #1015: The validate icon must be greyed and inactive instead of red and active Popup menu actions upper parent should be the main application to have visible status tip information in status bar --- diff --git a/src/XGUI/XGUI_ErrorMgr.cpp b/src/XGUI/XGUI_ErrorMgr.cpp index 79a7c1ae0..84b2c90a5 100644 --- a/src/XGUI/XGUI_ErrorMgr.cpp +++ b/src/XGUI/XGUI_ErrorMgr.cpp @@ -47,9 +47,11 @@ XGUI_ErrorMgr::XGUI_ErrorMgr(QObject* theParent, ModuleBase_IWorkshop* theWorksh XGUI_ActionsMgr* anActionsMgr = workshop()->actionsMgr(); QAction* anAcceptAllAction = anActionsMgr->operationStateAction(XGUI_ActionsMgr::AcceptAll); myAcceptAllToolTip = anAcceptAllAction->toolTip(); + myAcceptAllStatusTip = anAcceptAllAction->statusTip(); QAction* anOkAction = anActionsMgr->operationStateAction(XGUI_ActionsMgr::Accept); myAcceptToolTip = anOkAction->toolTip(); + myAcceptStatusTip = anOkAction->toolTip(); } XGUI_ErrorMgr::~XGUI_ErrorMgr() @@ -106,6 +108,7 @@ void XGUI_ErrorMgr::updateAcceptAllAction(const FeaturePtr& theFeature) bool anEnabled = anError.isEmpty(); anAcceptAllAction->setEnabled(anEnabled); anAcceptAllAction->setToolTip(!anEnabled ? anError : myAcceptAllToolTip); + anAcceptAllAction->setStatusTip(!anEnabled ? anError : myAcceptAllStatusTip); } } @@ -131,6 +134,7 @@ void XGUI_ErrorMgr::updateAcceptActionState(const QString& theError) anAcceptAction->setEnabled(anEnabled); anAcceptAction->setToolTip(anEnabled ? myAcceptToolTip : theError); + anAcceptAction->setStatusTip(anEnabled ? myAcceptStatusTip : theError); // some operations have no property panel, so it is important to check that it is not null if (myPropertyPanel) { // update controls error information diff --git a/src/XGUI/XGUI_ErrorMgr.h b/src/XGUI/XGUI_ErrorMgr.h index 4b1ca159c..b37b8ecac 100644 --- a/src/XGUI/XGUI_ErrorMgr.h +++ b/src/XGUI/XGUI_ErrorMgr.h @@ -76,6 +76,8 @@ private: QLabel* myErrorLabel; /// contains an error information QString myAcceptToolTip; /// cached tool tip value for enabled Accept action QString myAcceptAllToolTip; /// cached tool tip value for enabled AcceptAll action + QString myAcceptStatusTip; /// cached status tip value for enabled Accept action + QString myAcceptAllStatusTip; /// cached status tip value for enabled AcceptAll action }; #endif // XGUI_ErrorMgr_H \ No newline at end of file