From: vsv Date: Fri, 1 Nov 2019 08:45:11 +0000 (+0300) Subject: Issue #2924: Disable Delete command for sub-shapes of comp-solids X-Git-Tag: V9_4_0rc1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cc9e1590de15601c15bbbee5f067e2e42bd26701;p=modules%2Fshaper.git Issue #2924: Disable Delete command for sub-shapes of comp-solids --- diff --git a/src/ModuleBase/ModuleBase_Tools.cpp b/src/ModuleBase/ModuleBase_Tools.cpp index 2d6e80670..a1c4684a6 100644 --- a/src/ModuleBase/ModuleBase_Tools.cpp +++ b/src/ModuleBase/ModuleBase_Tools.cpp @@ -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; } }