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_5_0a1~167^2~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3c0e51026707112189859e75ebf088f2d388d9e2;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 b8f595cb3..84d4809a1 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; } }