From 2f84d1bbdf6ddf3296f5a2bff9fcd0b31133221f Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 28 May 2014 13:12:24 +0400 Subject: [PATCH] Working with nested actions uder SALOME --- src/XGUI/XGUI_ActionsMgr.cpp | 4 ++++ src/XGUI/XGUI_Workshop.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 { -- 2.39.2