From e34439bfd0fd53f5c10a1539835b77f535067a91 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 12 Mar 2015 16:34:21 +0300 Subject: [PATCH] Fix for issue #411: remove result shape to avoid the naming selection problem (selection works outside the current scope, but on the whole document) --- src/Model/Model_AttributeSelection.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); } -- 2.39.2