]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_Workshop.cpp
Salome HOME
Make automatic/manual rebuild property and connect the "Rebuild" button
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index 0f3fa139cae557e8daeb4cbf4a0a2f58064fbaa2..5ed671cc7018739cd9e70394bd561e7052251773 100644 (file)
@@ -196,6 +196,7 @@ void XGUI_Workshop::initMenu()
 
   aCommand = aGroup->addFeature("REBUILD_CMD", tr("Rebuild"), tr("Rebuild data objects"),
                                 QIcon(":pictures/rebuild.png"));
+  aCommand->connectTo(this, SLOT(onRebuild()));
 
   aCommand = aGroup->addFeature("SAVEAS_CMD", tr("Save as..."), tr("Save the document into a file"),
                                 QIcon(":pictures/save.png"));
@@ -750,6 +751,14 @@ void XGUI_Workshop::onRedo()
   updateCommandStatus();
 }
 
+//******************************************************
+void XGUI_Workshop::onRebuild()
+{
+  static const Events_ID aRebuildEvent = Events_Loop::loop()->eventByName("Rebuild");
+  Events_Loop::loop()->send(boost::shared_ptr<Events_Message>(
+    new Events_Message(aRebuildEvent, this)));
+}
+
 //******************************************************
 void XGUI_Workshop::onPreferences()
 {