aAction->setShortcut(Qt::Key_Delete);
aAction->setShortcutContext(Qt::ApplicationShortcut);
+ aAction = new QAction(QIcon(":pictures/move.png"), tr("Move..."), this);
+ addAction("MOVE_CMD", aAction);
+
aAction = new QAction(QIcon(":pictures/color.png"), tr("Color..."), this);
addAction("COLOR_CMD", aAction);
bool hasResult = false;
bool hasFeature = false;
bool hasParameter = false;
- ModuleBase_Tools::checkObjects(aObjects, hasResult, hasFeature, hasParameter);
+ bool hasSubFeature = false;
+ ModuleBase_Tools::checkObjects(aObjects, hasResult, hasFeature, hasParameter, hasSubFeature);
//Process Feature
if (aSelected == 1) {
if (!(hasParameter || hasFeature))
action("SHOW_ONLY_CMD")->setEnabled(true);
}
- }
+ else if (hasFeature && myWorkshop->canMoveFeature())
+ action("MOVE_CMD")->setEnabled(true);
+ }
} else {
if (hasResult && (!hasParameter)) {
action("SHOW_CMD")->setEnabled(true);
action("WIREFRAME_CMD")->setEnabled(true);
}
}
- if (hasFeature || hasParameter)
- action("DELETE_CMD")->setEnabled(true);
+ if (!hasSubFeature) {
+ if (hasFeature || hasParameter)
+ action("DELETE_CMD")->setEnabled(true);
+ }
}
if (myWorkshop->canChangeColor())
action("COLOR_CMD")->setEnabled(true);
// Feature menu
aList.clear();
aList.append(action("DELETE_CMD"));
+ aList.append(action("MOVE_CMD"));
myObjBrowserMenus[ModelAPI_Feature::group()] = aList;
+
+ aList.clear();
+ aList.append(action("DELETE_CMD"));
myObjBrowserMenus[ModelAPI_ResultParameter::group()] = aList;
//-------------------------------------
}
aActions.append(action("SHOW_ONLY_CMD"));
aActions.append(mySeparator);
aActions.append(action("DELETE_CMD"));
+ //aActions.append(action("MOVE_CMD"));
}
aMenu->addActions(aActions);