From: vsv Date: Fri, 7 Nov 2014 13:15:36 +0000 (+0300) Subject: Do not add Show/Hide menus to a Part. X-Git-Tag: V_0.5~16^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9af3aab29eab8c8fa3ac39022c52262df9dddd17;p=modules%2Fshaper.git Do not add Show/Hide menus to a Part. --- diff --git a/src/XGUI/XGUI_ContextMenuMgr.cpp b/src/XGUI/XGUI_ContextMenuMgr.cpp index 706899ebb..dee473c60 100644 --- a/src/XGUI/XGUI_ContextMenuMgr.cpp +++ b/src/XGUI/XGUI_ContextMenuMgr.cpp @@ -121,18 +121,14 @@ QMenu* XGUI_ContextMenuMgr::objectBrowserMenu() const XGUI_Displayer* aDisplayer = myWorkshop->displayer(); bool hasResult = false; bool hasFeature = false; - bool hasGroup = false; foreach(ObjectPtr aObj, aObjects) { FeaturePtr aFeature = boost::dynamic_pointer_cast(aObj); ResultPtr aResult = boost::dynamic_pointer_cast(aObj); - //ResultGroupPtr aGroupRes = boost::dynamic_pointer_cast(aObj); if (aResult) hasResult = true; if (aFeature) hasFeature = true; - //if (aGroupRes) - // hasGroup = true; if (hasFeature && hasResult) // && hasGroup) break; } @@ -165,7 +161,7 @@ QMenu* XGUI_ContextMenuMgr::objectBrowserMenu() const if (aMgr->activeDocument() != aMgr->moduleDocument()) aMenu->addAction(action("ACTIVATE_PART_CMD")); } - + } else { if (hasResult) { aMenu->addAction(action("SHOW_CMD")); aMenu->addAction(action("HIDE_CMD"));