- QString aSkippedId;
- if (myWorkshop->isSalomeMode()) {
- QAction* aToggledFeature = dynamic_cast<QAction*>(sender());
- aSkippedId = myWorkshop->salomeConnector()->commandId(aToggledFeature);
+void XGUI_ActionsMgr::setNestedStackEnabled(ModuleBase_Operation* theOperation)
+{
+ if(!theOperation || !theOperation->feature())
+ return;
+ FeaturePtr aFeature = theOperation->feature();
+ QString aFeatureId = QString::fromStdString(aFeature->getKind());
+ bool isNestedEnabled = theOperation->isNestedOperationsEnabled();
+ setNestedCommandsEnabled(isNestedEnabled, aFeatureId);
+
+ setNestedStackEnabled(myOperationMgr->previousOperation(theOperation));
+}
+
+//!
+void XGUI_ActionsMgr::setNestedCommandsEnabled(bool theEnabled, const QString& theParent)
+{
+ QStringList ltNestedActions;
+ if (theParent.isEmpty()) { //Disable ALL nested
+ foreach(QString eachParent, myNestedActions.keys()) {
+ ltNestedActions << myNestedActions[eachParent];
+ }