From: nds Date: Mon, 2 Feb 2015 07:17:16 +0000 (+0300) Subject: The sketch feature can be edited only in the active part. Otherwise the following... X-Git-Tag: V_1.0.0~1^2~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=25ed3ff975dec8f9de98c2c78c658aceb1e89b7f;p=modules%2Fshaper.git The sketch feature can be edited only in the active part. Otherwise the following case is incorrect: Create Sketch, create a line, apply, create a part, edit the sketch, create a lenght constraint, result is crash. --- diff --git a/src/XGUI/XGUI_ContextMenuMgr.cpp b/src/XGUI/XGUI_ContextMenuMgr.cpp index dcde2a6b5..cf481949f 100644 --- a/src/XGUI/XGUI_ContextMenuMgr.cpp +++ b/src/XGUI/XGUI_ContextMenuMgr.cpp @@ -145,7 +145,7 @@ QMenu* XGUI_ContextMenuMgr::objectBrowserMenu() const aMenu->addAction(action("DEACTIVATE_PART_CMD")); else aMenu->addAction(action("ACTIVATE_PART_CMD")); - } else if (hasFeature) { + } else if (hasFeature && aObject->document() == aMgr->activeDocument()) { aMenu->addAction(action("EDIT_CMD")); } else { if (aDisplayer->isVisible(aObject)) {