]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2924: Disable Delete command for sub-shapes of comp-solids
authorvsv <vsv@opencascade.com>
Fri, 1 Nov 2019 08:45:11 +0000 (11:45 +0300)
committervsv <vsv@opencascade.com>
Wed, 6 Nov 2019 08:27:42 +0000 (11:27 +0300)
src/ModuleBase/ModuleBase_Tools.cpp

index b8f595cb36a8f0b72563e75493b6ed89201436c6..84d4809a1cc64343f32e356fdd5d39cf33e0e5d9 100644 (file)
@@ -407,13 +407,15 @@ void checkObjects(const QObjectPtrList& theObjects, bool& hasResult, bool& hasFe
     hasParameter |= (aConstruction.get() != NULL);
     if (hasFeature)
       hasCompositeOwner |= (ModelAPI_Tools::compositeOwner(aFeature) != NULL);
+    else if (aResult.get())
+      hasCompositeOwner |= (ModelAPI_Tools::bodyOwner(aResult) != NULL);
 
     if (!hasResultInHistory && aResult.get()) {
       FeaturePtr aFeature = ModelAPI_Feature::feature(aResult);
       hasResultInHistory = aFeature.get() && aFeature->isInHistory();
     }
 
-    if (hasFeature && hasResult  && hasParameter && hasCompositeOwner && hasFeature)
+    if (hasFeature && hasResult  && hasParameter && hasCompositeOwner)
       break;
   }
 }