]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Remove Rebuild menu item from Salome module
authorvsv <vitaly.smetannikov@opencascade.com>
Tue, 17 Nov 2015 16:20:01 +0000 (19:20 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Tue, 17 Nov 2015 16:20:01 +0000 (19:20 +0300)
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h

index e8840c1a4c3a7ba5fd1f610f743a5ca5373ee0b9..da722f6dfce93efe92542d9d8e098c82c1c85cfa 100755 (executable)
@@ -280,13 +280,13 @@ void XGUI_Workshop::initMenu()
   addHistoryMenu(aAction, SIGNAL(updateRedoHistory(const QList<ActionInfo>&)), 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<Events_Message>(
-    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<Events_Message>(
+//    new Events_Message(aRebuildEvent, this)));
+//  if (!aWasOperation) {
+//    aMgr->finishOperation();
+//  }
+//  updateCommandStatus();
+//}
 
 //******************************************************
 void XGUI_Workshop::onWidgetStateChanged(int thePreviousState)
index 5aa9e7802f64b58ae1de8f4a26e866e5f887b688..505bf5370343d4e909078c396582b47d94198c12 100755 (executable)
@@ -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