X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_MainMenu.cpp;h=4c8e7dc3c6ce612b6530213ce6c974f56ae5cdda;hb=4ee6972a725f02500c2c543abeef2909180e09c1;hp=96106a9111357da303ce4d14993cd204893aa057;hpb=c80e8ac643930b858f4f653e2659896ba587b165;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_MainMenu.cpp b/src/XGUI/XGUI_MainMenu.cpp index 96106a911..4c8e7dc3c 100644 --- a/src/XGUI/XGUI_MainMenu.cpp +++ b/src/XGUI/XGUI_MainMenu.cpp @@ -91,48 +91,3 @@ QList XGUI_MainMenu::features() const return aList; } -void XGUI_MainMenu::onFeatureChecked(bool isChecked) -{ - if (!isChecked) { - restoreCommandState(); - return; - } - - saveCommandsState(); - QStringList aSkippedIds; - XGUI_Command* aToggledFeature = dynamic_cast(sender()); - aSkippedIds.append(aToggledFeature->unblockableCommands()); -// aSkippedIds.append(aToggledFeature->id()); - XGUI_Workbench* aGeneralWB = findWorkbench(tr("General")); - foreach(XGUI_Command* eachFeature, aGeneralWB->features()) { - aSkippedIds.append(eachFeature->id()); - } - QList allFeatures = features(); - foreach(XGUI_Command* eachFeature, allFeatures) { - QString aFeatureId = eachFeature->id(); - if (aSkippedIds.removeAll(aFeatureId) > 0) { - continue; - } - eachFeature->setEnabled(false); - } -} - -void XGUI_MainMenu::saveCommandsState() -{ - myCommandState.clear(); - QList allFeatures = features(); - XGUI_Command* eachFeature = NULL; - foreach(eachFeature, allFeatures) { - myCommandState.insert(eachFeature, eachFeature->enabled()); - } -} - -void XGUI_MainMenu::restoreCommandState() -{ - QList allFeatures = features(); - XGUI_Command* eachFeature = NULL; - foreach(eachFeature, allFeatures) { - eachFeature->setChecked(false); - eachFeature->setEnabled(myCommandState[eachFeature]); - } -}