foreach(QAction* aAction, myActions)
aAction->setEnabled(false);
- //bool aIsDone = false;
- //ModuleBase_IModule* aModule = myWorkshop->module();
- //if (aModule)
- // aIsDone = aModule->addViewerMenu(theMenu, myActions);
-
XGUI_SelectionMgr* aSelMgr = myWorkshop->selector();
QObjectPtrList aObjects = aSelMgr->selection()->selectedObjects();
if (aObjects.size() > 0) {
QActionsList aActions;
if (aSelected == 1) {
ObjectPtr aObject = aObjects.first();
- if (myViewerMenu.contains(aObject->groupName()))
- aActions = myObjBrowserMenus[aObject->groupName()];
+ std::string aName = aObject->groupName();
+ if (myObjBrowserMenus.contains(aName))
+ aActions = myObjBrowserMenus[aName];
} else if (aSelected > 1) {
aActions.append(action("HIDE_CMD"));
aActions.append(action("SHOW_ONLY_CMD"));
ModuleBase_IModule* aModule = myWorkshop->module();
if (aModule) {
- aModule->addObjectBrowserMenu(aMenu);
aMenu->addSeparator();
+ aModule->addObjectBrowserMenu(aMenu);
}
+ aMenu->addSeparator();
aMenu->addActions(myWorkshop->objectBrowser()->actions());
return aMenu;
QActionsList aActions;
if (aSelected == 1) {
ObjectPtr aObject = aObjects.first();
- if (myViewerMenu.contains(aObject->groupName()))
- aActions = myViewerMenu[aObject->groupName()];
+ std::string aName = aObject->groupName();
+ if (myViewerMenu.contains(aName))
+ aActions = myViewerMenu[aName];
} else if (aSelected > 1) {
aActions.append(action("HIDE_CMD"));
}