aDesktop->addAction(aAction);
addAction("DELETE_CMD", aAction);
aDesktop->addAction(aAction);
addAction("DELETE_CMD", aAction);
aAction->setShortcutContext(Qt::ApplicationShortcut);
aAction = new QAction(QIcon(":pictures/rename_edit.png"), tr("Rename"), this);
aAction->setShortcutContext(Qt::ApplicationShortcut);
aAction = new QAction(QIcon(":pictures/rename_edit.png"), tr("Rename"), this);
aAction = new QAction(QIcon(":pictures/move.png"), XGUI_Workshop::MOVE_TO_END_COMMAND, this);
addAction("MOVE_CMD", aAction);
aAction = new QAction(QIcon(":pictures/move.png"), XGUI_Workshop::MOVE_TO_END_COMMAND, this);
addAction("MOVE_CMD", aAction);
aAction = new QAction(QIcon(":pictures/color.png"), tr("Color..."), this);
addAction("COLOR_CMD", aAction);
aAction = new QAction(QIcon(":pictures/color.png"), tr("Color..."), this);
addAction("COLOR_CMD", aAction);
aList.append(mySeparator);
aList.append(action("RENAME_CMD"));
myObjBrowserMenus[ModelAPI_Feature::group()] = aList;
aList.clear();
aList.append(action("DELETE_CMD"));
aList.append(mySeparator);
aList.append(action("RENAME_CMD"));
myObjBrowserMenus[ModelAPI_Feature::group()] = aList;
aList.clear();
aList.append(action("DELETE_CMD"));
aList.append(mySeparator);
aList.append(action("RENAME_CMD"));
myObjBrowserMenus[ModelAPI_ResultParameter::group()] = aList;
aList.append(mySeparator);
aList.append(action("RENAME_CMD"));
myObjBrowserMenus[ModelAPI_ResultParameter::group()] = aList;
aActions.append(mySeparator);
aActions.append(action("DELETE_CMD"));
//aActions.append(action("MOVE_CMD"));
aActions.append(mySeparator);
aActions.append(action("DELETE_CMD"));
//aActions.append(action("MOVE_CMD"));
- std::string aName = aObject->groupName();
- if (myViewerMenu.contains(aName))
- aActions = myViewerMenu[aName];
+ if (aObject.get() != NULL) {
+ std::string aName = aObject->groupName();
+ if (myViewerMenu.contains(aName))
+ aActions = myViewerMenu[aName];
+ }
aActions.append(action("COLOR_CMD"));
} else if (aSelected > 1) {
aActions.append(action("HIDE_CMD"));
aActions.append(action("COLOR_CMD"));
} else if (aSelected > 1) {
aActions.append(action("HIDE_CMD"));