]> 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>
Fri, 1 Nov 2019 08:45:11 +0000 (11:45 +0300)
src/ModuleBase/ModuleBase_Tools.cpp

index 2d6e806705cf5f35ceb4808ecab2c8dfc2fa6528..a1c4684a672d661425034da933c6c0c1d97e505a 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;
   }
 }