void XGUI_ActionsMgr::updateCommandsStatus()
{
- setAllEnabled(true);
+ setAllEnabled();
XGUI_Selection* aSelection = myWorkshop->selector()->selection();
if (aSelection->getSelected(ModuleBase_ISelection::Viewer).size() > 0)
updateOnViewSelection();
}
break;
case Preview: {
- aResult = new QAction("See the preview", theParent);
+ aResult = new QAction("See preview", theParent);
aResult->setToolTip("Compute preview");
}
break;
return aResult;
}
-void XGUI_ActionsMgr::setAllEnabled(bool isEnabled)
+void XGUI_ActionsMgr::setAllEnabled()
{
foreach(QString eachAction, myActions.keys()) {
- setActionEnabled(eachAction, isEnabled);
+ if (myActions.contains(eachAction)) {
+ QAction* aAction = myActions[eachAction];
+ aAction->setEnabled(true);
+ }
}
}