From 344158ffea05b687f0d8313ec12013d695f295ff Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 24 May 2016 11:40:56 +0300 Subject: [PATCH] Issue #1015: The validate icon must be greyed and inactive instead of red and active Actions contain information for Status bar --- src/XGUI/XGUI_ModuleConnector.cpp | 10 +--------- src/XGUI/XGUI_Workshop.cpp | 9 +++++++++ src/XGUI/XGUI_Workshop.h | 4 ++++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/XGUI/XGUI_ModuleConnector.cpp b/src/XGUI/XGUI_ModuleConnector.cpp index 326117bab..8fd52e598 100644 --- a/src/XGUI/XGUI_ModuleConnector.cpp +++ b/src/XGUI/XGUI_ModuleConnector.cpp @@ -118,17 +118,9 @@ void XGUI_ModuleConnector::setSelected(const QList& the } } -#include -#include void XGUI_ModuleConnector::setStatusBarMessage(const QString& theMessage) { -#ifdef HAVE_SALOME - //return myWorkshop->salomeConnector()->featureInfo(theId); -#else - QMainWindow* aDesktop = desktop(); - aDesktop->statusBar()->showMessage(theMessage); - -#endif + myWorkshop->setStatusBarMessage(theMessage); } bool XGUI_ModuleConnector::canStartOperation(QString theId) diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 8e8b92f5f..fe2d68b54 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1890,6 +1890,15 @@ QList XGUI_Workshop::processHistoryList(const std::list return aResult; } +void XGUI_Workshop::setStatusBarMessage(const QString& theMessage) +{ +#ifdef HAVE_SALOME + return salomeConnector()->desktop(); +#else + myMainWindow->putInfo(theMessage, -1); +#endif +} + void XGUI_Workshop::synchronizeViewer() { SessionPtr aMgr = ModelAPI_Session::get(); diff --git a/src/XGUI/XGUI_Workshop.h b/src/XGUI/XGUI_Workshop.h index c969da8c0..835816cf4 100755 --- a/src/XGUI/XGUI_Workshop.h +++ b/src/XGUI/XGUI_Workshop.h @@ -261,6 +261,10 @@ Q_OBJECT /// \param theFeature a feature bool isFeatureOfNested(const FeaturePtr& theFeature); + //! Shows the message in the status bar + //! \param theMessage a message + void setStatusBarMessage(const QString& theMessage); + /// Has to be called in order to display objects with visibility status = true void synchronizeViewer(); -- 2.39.2