From: mpv Date: Thu, 12 Mar 2015 13:34:21 +0000 (+0300) Subject: Fix for issue #411: remove result shape to avoid the naming selection problem (select... X-Git-Tag: V_1.0.2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e34439bfd0fd53f5c10a1539835b77f535067a91;p=modules%2Fshaper.git Fix for issue #411: remove result shape to avoid the naming selection problem (selection works outside the current scope, but on the whole document) --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index b0b4d4b41..29c1b950f 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -373,9 +373,9 @@ void Model_AttributeSelection::selectBody( TopoDS_Shape aContext; ResultBodyPtr aBody = std::dynamic_pointer_cast(myRef.value()); - if (aBody) + if (aBody) { aContext = aBody->shape()->impl(); - else { + } else { ResultConstructionPtr aConstr = std::dynamic_pointer_cast(myRef.value()); if (aConstr) { aContext = aConstr->shape()->impl(); @@ -384,6 +384,11 @@ void Model_AttributeSelection::selectBody( return; } } + /// fix for issue 411: result modified shapes must not participate in this selection mechanism + FeaturePtr aFeatureOwner = std::dynamic_pointer_cast(owner()); + if (aFeatureOwner.get()) + aFeatureOwner->eraseResults(); + aSel.Select(aNewShape, aContext); }