From 2460865a83b26fca76fcc688c8b1145b4ef92e41 Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 4 Sep 2015 11:25:08 +0300 Subject: [PATCH] Issue #807: disable the show/hide actions if the part set document is not active --- src/XGUI/XGUI_ContextMenuMgr.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); -- 2.39.2