+ myNestedActions[theId] = theCommands;
+}
+
+QStringList XGUI_ActionsMgr::nestedCommands(const QString& theId) const
+{
+ if (myNestedActions.contains(theId))
+ return myNestedActions[theId];
+ return QStringList();
+}
+
+bool XGUI_ActionsMgr::isNested(const QString& theId) const
+{
+ foreach(QString aId, myNestedActions.keys())
+ {
+ QStringList aList = myNestedActions[aId];
+ if (aList.contains(theId))
+ return true;
+ }
+ return false;
+}
+
+void XGUI_ActionsMgr::updateCommandsStatus()
+{
+ setAllEnabled();
+ XGUI_Selection* aSelection = myWorkshop->selector()->selection();
+ if (aSelection->getSelected(ModuleBase_ISelection::AllControls).size() > 0)
+ updateOnViewSelection();
+
+ FeaturePtr anActiveFeature = FeaturePtr();
+ ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
+ (myOperationMgr->currentOperation());
+ if (aFOperation) {
+ anActiveFeature = aFOperation->feature();
+ QStringList aNested = allNestedCommands(aFOperation);
+ foreach(QString aAction, myActions.keys()) {
+ if (!aNested.contains(aAction))
+ setActionEnabled(aAction, false);
+ }
+ } else
+ setNestedCommandsEnabled(false);
+
+ updateByPlugins(anActiveFeature);
+ updateByDocumentKind();
+ updateCheckState();
+}
+
+void XGUI_ActionsMgr::updateCheckState()
+{
+ QString eachCommand = QString();
+ foreach(eachCommand, myActions.keys()) {
+ setActionChecked(eachCommand, false);
+ }
+ QStringList ltActiveCommands = myOperationMgr->operationList();
+ foreach(eachCommand, ltActiveCommands) {
+ setActionChecked(eachCommand, true);
+ }
+}
+
+void XGUI_ActionsMgr::updateOnViewSelection()
+{
+ if (!myOperationMgr->hasOperation())