From 13d3f0d8b46a06931cbe8620b8563049eff4a9f6 Mon Sep 17 00:00:00 2001 From: spo Date: Thu, 10 Sep 2015 15:39:15 +0300 Subject: [PATCH] Issue #904 - Fatal error aftre delete sketch from dataset used in extrusion in part --- src/XGUI/XGUI_Workshop.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; -- 2.39.2