]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #904 - Fatal error aftre delete sketch from dataset used in extrusion in part
authorspo <sergey.pokhodenko@opencascade.com>
Thu, 10 Sep 2015 12:39:15 +0000 (15:39 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Thu, 10 Sep 2015 12:39:51 +0000 (15:39 +0300)
src/XGUI/XGUI_Workshop.cpp

index 38ca4d9340844358fa33782bca4267c785ee7423..989d7148c599b7c6286d4f0e26d1ee2e62dc1201 100644 (file)
@@ -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;