From: vsv Date: Wed, 28 May 2014 09:12:24 +0000 (+0400) Subject: Working with nested actions uder SALOME X-Git-Tag: V_0.4.4~341^2^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2f84d1bbdf6ddf3296f5a2bff9fcd0b31133221f;p=modules%2Fshaper.git Working with nested actions uder SALOME --- diff --git a/src/XGUI/XGUI_ActionsMgr.cpp b/src/XGUI/XGUI_ActionsMgr.cpp index 6815d81d3..8722c0896 100644 --- a/src/XGUI/XGUI_ActionsMgr.cpp +++ b/src/XGUI/XGUI_ActionsMgr.cpp @@ -6,6 +6,7 @@ #include "XGUI_Command.h" #include "XGUI_Workshop.h" #include "XGUI_OperationMgr.h" +#include "XGUI_SalomeConnector.h" #include @@ -37,6 +38,9 @@ void XGUI_ActionsMgr::addCommand(QAction* theCmd) XGUI_Command* aXCmd = dynamic_cast(theCmd); if (aXCmd) { myNestedActions[aId] = aXCmd->nestedCommands(); + } else { + XGUI_Workshop* aWorkshop = static_cast(parent()); + myNestedActions[aId] = aWorkshop->salomeConnector()->nestedActions(aId); } } diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index e075762ae..1a5d25095 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -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 {