- } else {
- FeaturePtr anActiveFeature = FeaturePtr();
- ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
- (myOperationMgr->currentOperation());
- if (aFOperation) {
- anActiveFeature = aFOperation->feature();
- if(anActiveFeature.get()) {
- setAllEnabled(false);
- //QString aFeatureId = QString::fromStdString(anActiveFeature->getKind());
- //setActionEnabled(aFeatureId, true);
- }
- setNestedStackEnabled(aFOperation);
- } else {
- setAllEnabled(true);
- setNestedCommandsEnabled(false);
+
+ 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);