From ba7868e4cc52b661c4cb1efdcaf35ab30a2a7e8d Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 11 Dec 2017 16:43:11 +0300 Subject: [PATCH] Correction to use only new shapes for the naming name search --- src/Model/Model_SelectionNaming.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Model/Model_SelectionNaming.cpp b/src/Model/Model_SelectionNaming.cpp index 50b64918e..7d4c36cc0 100644 --- a/src/Model/Model_SelectionNaming.cpp +++ b/src/Model/Model_SelectionNaming.cpp @@ -76,7 +76,14 @@ static Handle(TNaming_NamedShape) shapeToNS(const TDF_Label theLabAccess, TDF_Label aLabel = aNSIter.Label(); Handle(TNaming_NamedShape) aNS; if (aLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS)) { - if (aNS->Evolution() != TNaming_SELECTED) { + if (aNS->Evolution() != TNaming_SELECTED && aNS->Evolution() != TNaming_DELETE) { + // check this is new shape in this named shape + bool aIsNew = false; + for(TNaming_Iterator aNSIter(aNS); aNSIter.More(); aNSIter.Next()) + if (!aNSIter.NewShape().IsNull() && aNSIter.NewShape().IsSame(theShape)) + aIsNew = true; + if (!aIsNew) + continue; // check this is the context-shape while(aLabel.Depth() > aContextLabDepth) aLabel = aLabel.Father(); -- 2.39.2