From: spo Date: Thu, 10 Sep 2015 12:39:15 +0000 (+0300) Subject: Issue #904 - Fatal error aftre delete sketch from dataset used in extrusion in part X-Git-Tag: V_1.4.0_beta4~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=13d3f0d8b46a06931cbe8620b8563049eff4a9f6;p=modules%2Fshaper.git Issue #904 - Fatal error aftre delete sketch from dataset used in extrusion in part --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 38ca4d934..989d7148c 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1295,8 +1295,12 @@ bool XGUI_Workshop::canMoveFeature() QObjectPtrList aObjects = mySelector->selection()->selectedObjects(); QObjectPtrList aValidatedObjects; foreach (ObjectPtr aObject, aObjects) { - if (myModule->canApplyAction(aObject, anActionId)) - aValidatedObjects.append(aObject); + if (!myModule->canApplyAction(aObject, anActionId)) + continue; + // To be moved feature should be in active document + if (aObject->document() != ModelAPI_Session::get()->activeDocument()) + continue; + aValidatedObjects.append(aObject); } if (aValidatedObjects.size() != aObjects.size()) aObjects = aValidatedObjects;