From: mpv Date: Mon, 11 Dec 2017 13:43:11 +0000 (+0300) Subject: Correction to use only new shapes for the naming name search X-Git-Tag: V_2.10.0RC~60 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ba7868e4cc52b661c4cb1efdcaf35ab30a2a7e8d;p=modules%2Fshaper.git Correction to use only new shapes for the naming name search --- 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();