aAction = ModuleBase_Tools::createAction(QIcon(""), tr("Deflection..."), aDesktop);
addAction("DEFLECTION_CMD", aAction);
+#ifdef USE_TRANSPARENCY
+ aAction = ModuleBase_Tools::createAction(QIcon(":pictures/transparency.png"),
+ tr("Transparency..."), aDesktop);
+ addAction("TRANSPARENCY_CMD", aAction);
+#endif
+
aAction = ModuleBase_Tools::createAction(QIcon(":pictures/eye_pencil.png"), tr("Show"), aDesktop);
addAction("SHOW_CMD", aAction);
action("SHOW_ONLY_CMD")->setEnabled(false);
}
- if (myWorkshop->canChangeColor())
- action("COLOR_CMD")->setEnabled(true);
-
- if (myWorkshop->canChangeDeflection())
- action("DEFLECTION_CMD")->setEnabled(true);
-
+ action("COLOR_CMD")->setEnabled(myWorkshop->canChangeProperty("COLOR_CMD"));
+ action("DEFLECTION_CMD")->setEnabled(myWorkshop->canChangeProperty("DEFLECTION_CMD"));
+#ifdef USE_TRANSPARENCY
+ action("TRANSPARENCY_CMD")->setEnabled(myWorkshop->canChangeProperty("TRANSPARENCY_CMD"));
+#endif
#ifdef _DEBUG
#ifdef TINSPECTOR
action("TINSPECTOR_VIEW")->setEnabled(true);
if (aModule)
aModule->updateViewerMenu(myActions);
- if (myWorkshop->canChangeColor())
+ if (myWorkshop->canChangeProperty("COLOR_CMD"))
action("COLOR_CMD")->setEnabled(true);
- if (myWorkshop->canChangeDeflection())
+ if (myWorkshop->canChangeProperty("DEFLECTION_CMD"))
action("DEFLECTION_CMD")->setEnabled(true);
+#ifdef USE_TRANSPARENCY
+ if (myWorkshop->canChangeProperty("TRANSPARENCY_CMD"))
+ action("TRANSPARENCY_CMD")->setEnabled(true);
+#endif
+
action("DELETE_CMD")->setEnabled(true);
}
aList.append(action("RENAME_CMD"));
aList.append(action("COLOR_CMD"));
aList.append(action("DEFLECTION_CMD"));
+#ifdef USE_TRANSPARENCY
+ aList.append(action("TRANSPARENCY_CMD"));
+#endif
aList.append(action("SHOW_FEATURE_CMD"));
myObjBrowserMenus[ModelAPI_ResultConstruction::group()] = aList;
aList.append(action("RENAME_CMD"));
aList.append(action("COLOR_CMD"));
aList.append(action("DEFLECTION_CMD"));
+#ifdef USE_TRANSPARENCY
+ aList.append(action("TRANSPARENCY_CMD"));
+#endif
aList.append(action("SHOW_FEATURE_CMD"));
myObjBrowserMenus[ModelAPI_ResultBody::group()] = aList;
// Group menu
aList.append(mySeparator);
aList.append(action("COLOR_CMD"));
aList.append(action("DEFLECTION_CMD"));
+#ifdef USE_TRANSPARENCY
+ aList.append(action("TRANSPARENCY_CMD"));
+#endif
myViewerMenu[ModelAPI_ResultConstruction::group()] = aList;
// Result part menu
myViewerMenu[ModelAPI_ResultPart::group()] = aList;
aList.append(mySeparator);
aList.append(action("COLOR_CMD"));
aList.append(action("DEFLECTION_CMD"));
+#ifdef USE_TRANSPARENCY
+ aList.append(action("TRANSPARENCY_CMD"));
+#endif
myViewerMenu[ModelAPI_ResultBody::group()] = aList;
// Group menu
myViewerMenu[ModelAPI_ResultGroup::group()] = aList;
//aActions.append(action("MOVE_CMD"));
aActions.append(action("COLOR_CMD"));
aActions.append(action("DEFLECTION_CMD"));
-
+#ifdef USE_TRANSPARENCY
+ aActions.append(action("TRANSPARENCY_CMD"));
+#endif
aActions.append(action("CLEAN_HISTORY_CMD"));
aActions.append(action("DELETE_CMD"));
}
aActions.append(action("HIDEALL_CMD"));
aActions.append(action("COLOR_CMD"));
aActions.append(action("DEFLECTION_CMD"));
-
+#ifdef USE_TRANSPARENCY
+ aActions.append(action("TRANSPARENCY_CMD"));
+#endif
theMenu->addActions(aActions);
QMap<int, QAction*> aMenuActions;
bool aIsRoot = false;
foreach(QModelIndex aIdx, aSelectedIndexes) {
// Process only first column
- if (aIdx.column() == 0) {
+ if (aIdx.column() == 1) {
aIsRoot = !aIdx.parent().isValid();
// Exit if the selected index belongs to non active document
if (aIsRoot && (aActiveDoc != aMgr->moduleDocument()))