]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#1106 Hide All in viewer when nothing is selected
authornds <nds@opencascade.com>
Tue, 1 Dec 2015 13:38:52 +0000 (16:38 +0300)
committerdbv <dbv@opencascade.com>
Tue, 8 Dec 2015 08:48:53 +0000 (11:48 +0300)
src/XGUI/XGUI_ContextMenuMgr.cpp

index 0327796b471d875ff30038f17e443adb8eb00b03..57c622ac3ad66bfe5408be5e957258228c4cd44f 100644 (file)
@@ -388,7 +388,6 @@ void XGUI_ContextMenuMgr::buildViewerMenu()
   // Result construction menu
   aList.append(action("HIDE_CMD"));
   aList.append(action("SHOW_ONLY_CMD"));
-  aList.append(action("HIDEALL_CMD"));
   aList.append(action("COLOR_CMD"));
   myViewerMenu[ModelAPI_ResultConstruction::group()] = aList;
   // Result part menu
@@ -402,7 +401,6 @@ void XGUI_ContextMenuMgr::buildViewerMenu()
   aList.append(mySeparator);
   aList.append(action("HIDE_CMD"));
   aList.append(action("SHOW_ONLY_CMD"));
-  aList.append(action("HIDEALL_CMD"));
   myViewerMenu[ModelAPI_ResultBody::group()] = aList;
   // Group menu
   myViewerMenu[ModelAPI_ResultGroup::group()] = aList;
@@ -466,6 +464,8 @@ void XGUI_ContextMenuMgr::addViewerMenu(QMenu* theMenu) const
     aActions.append(action("HIDE_CMD"));
     aActions.append(action("COLOR_CMD"));
   }
+  // hide all is shown always even if selection in the viewer is empty
+  aActions.append(action("HIDEALL_CMD"));
   theMenu->addActions(aActions);
 
 #ifndef HAVE_SALOME