From: asl Date: Fri, 4 Sep 2015 08:25:08 +0000 (+0300) Subject: Issue #807: disable the show/hide actions if the part set document is not active X-Git-Tag: V_1.4.0_beta4~126^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2460865a83b26fca76fcc688c8b1145b4ef92e41;p=modules%2Fshaper.git Issue #807: disable the show/hide actions if the part set document is not active --- diff --git a/src/XGUI/XGUI_ContextMenuMgr.cpp b/src/XGUI/XGUI_ContextMenuMgr.cpp index 28bafc37e..1a138f747 100644 --- a/src/XGUI/XGUI_ContextMenuMgr.cpp +++ b/src/XGUI/XGUI_ContextMenuMgr.cpp @@ -227,6 +227,16 @@ void XGUI_ContextMenuMgr::updateObjectBrowserMenu() action("DELETE_CMD")->setEnabled(true); } } + + bool isPartSetDocActive = + ModelAPI_Session::get()->activeDocument()==ModelAPI_Session::get()->moduleDocument(); + if( !isPartSetDocActive ) + { + action("SHOW_CMD")->setEnabled(false); + action("HIDE_CMD")->setEnabled(false); + action("SHOW_ONLY_CMD")->setEnabled(false); + } + if (myWorkshop->canChangeColor()) action("COLOR_CMD")->setEnabled(true);