]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Working with nested actions uder SALOME
authorvsv <vitaly.smetannikov@opencascade.com>
Wed, 28 May 2014 09:12:24 +0000 (13:12 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Wed, 28 May 2014 09:12:24 +0000 (13:12 +0400)
src/XGUI/XGUI_ActionsMgr.cpp
src/XGUI/XGUI_Workshop.cpp

index 6815d81d357d7756c7285478b3f8cef717440b48..8722c089649af58c9bd6f1229c8d06ba1e1c8f78 100644 (file)
@@ -6,6 +6,7 @@
 #include "XGUI_Command.h"
 #include "XGUI_Workshop.h"
 #include "XGUI_OperationMgr.h"
+#include "XGUI_SalomeConnector.h"
 
 #include <ModuleBase_Operation.h>
 
@@ -37,6 +38,9 @@ void XGUI_ActionsMgr::addCommand(QAction* theCmd)
   XGUI_Command* aXCmd = dynamic_cast<XGUI_Command*>(theCmd);
   if (aXCmd) {
     myNestedActions[aId] = aXCmd->nestedCommands();
+  } else {
+    XGUI_Workshop* aWorkshop = static_cast<XGUI_Workshop*>(parent());
+    myNestedActions[aId] = aWorkshop->salomeConnector()->nestedActions(aId);
   }
 }
 
index e075762aebfda8440c83f59f9fa34d092d56c374..1a5d25095749729ae9f06d69327ec457fb867a26 100644 (file)
@@ -336,8 +336,8 @@ void XGUI_Workshop::addFeature(const Config_FeatureMessage* theMessage)
                               QString::fromStdString(theMessage->tooltip()),
                               QIcon(theMessage->icon().c_str()),
                               QKeySequence(), isUsePropPanel);
-    myActionsMgr->addCommand(aAction);
     salomeConnector()->setNestedActions(aId, aNestedFeatures.split(" "));
+    myActionsMgr->addCommand(aAction);
     myPartSetModule->featureCreated(aAction);
   } else {