From: vsv Date: Tue, 17 Nov 2015 16:20:01 +0000 (+0300) Subject: Remove Rebuild menu item from Salome module X-Git-Tag: V_2.0.0~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=89cdffc2206a0023b132cfabacd1f5cad1ebb900;p=modules%2Fshaper.git Remove Rebuild menu item from Salome module --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index e8840c1a4..da722f6df 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -280,13 +280,13 @@ void XGUI_Workshop::initMenu() addHistoryMenu(aAction, SIGNAL(updateRedoHistory(const QList&)), SLOT(onRedo(int))); salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT"); - aAction = salomeConnector()->addDesktopCommand("REBUILD_CMD", tr("Rebuild"), tr("Rebuild data objects"), - QIcon(":pictures/rebuild.png"), QKeySequence(), - false, "MEN_DESK_EDIT"); - salomeConnector()->addActionInToolbar( aAction, aToolBarTitle ); + //aAction = salomeConnector()->addDesktopCommand("REBUILD_CMD", tr("Rebuild"), tr("Rebuild data objects"), + // QIcon(":pictures/rebuild.png"), QKeySequence(), + // false, "MEN_DESK_EDIT"); + //salomeConnector()->addActionInToolbar( aAction, aToolBarTitle ); - connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onRebuild())); - salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT"); + //connect(aAction, SIGNAL(triggered(bool)), this, SLOT(onRebuild())); + //salomeConnector()->addDesktopMenuSeparator("MEN_DESK_EDIT"); aAction = salomeConnector()->addDesktopCommand("SAVEAS_CMD", tr("Export NewGeom..."), tr("Export the current document into a NewGeom file"), QIcon(), QKeySequence(), @@ -847,21 +847,21 @@ void XGUI_Workshop::onRedo(int theTimes) } //****************************************************** -void XGUI_Workshop::onRebuild() -{ - SessionPtr aMgr = ModelAPI_Session::get(); - bool aWasOperation = aMgr->isOperation(); // keep this value - if (!aWasOperation) { - aMgr->startOperation("Rebuild"); - } - static const Events_ID aRebuildEvent = Events_Loop::loop()->eventByName("Rebuild"); - Events_Loop::loop()->send(std::shared_ptr( - new Events_Message(aRebuildEvent, this))); - if (!aWasOperation) { - aMgr->finishOperation(); - } - updateCommandStatus(); -} +//void XGUI_Workshop::onRebuild() +//{ +// SessionPtr aMgr = ModelAPI_Session::get(); +// bool aWasOperation = aMgr->isOperation(); // keep this value +// if (!aWasOperation) { +// aMgr->startOperation("Rebuild"); +// } +// static const Events_ID aRebuildEvent = Events_Loop::loop()->eventByName("Rebuild"); +// Events_Loop::loop()->send(std::shared_ptr( +// new Events_Message(aRebuildEvent, this))); +// if (!aWasOperation) { +// aMgr->finishOperation(); +// } +// updateCommandStatus(); +//} //****************************************************** void XGUI_Workshop::onWidgetStateChanged(int thePreviousState) diff --git a/src/XGUI/XGUI_Workshop.h b/src/XGUI/XGUI_Workshop.h index 5aa9e7802..505bf5370 100755 --- a/src/XGUI/XGUI_Workshop.h +++ b/src/XGUI/XGUI_Workshop.h @@ -296,8 +296,8 @@ signals: /// Redo previous command void onRedo(int times = 1); - /// Rebuild data tree - void onRebuild(); + // Rebuild data tree + //void onRebuild(); /// Validates the operation to change the "Apply" button state. /// \param thePreviousState the previous state of the widget