Salome HOME
Issue #1432: Highlight Feature by shape in comp-solid
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 22 Apr 2016 15:46:13 +0000 (18:46 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 22 Apr 2016 15:46:13 +0000 (18:46 +0300)
src/Model/Model_Document.cpp

index 9836570f0859b53135125f8fd8915086bfa7f90c..072b07d71f535d702a47d6384bba044e4c543329 100755 (executable)
@@ -1302,8 +1302,8 @@ std::shared_ptr<ModelAPI_Feature> Model_Document::producedByFeature(
   Handle(TNaming_NamedShape) aCandidatInThis, aCandidatContainer;
   TDF_Label aBodyLab = aBodyData->label();
   // use childs and this label (the lowest priority)
-  bool aUseThis = false;
   TDF_ChildIDIterator aNSIter(aBodyLab, TNaming_NamedShape::GetID(), Standard_True);
+  bool aUseThis = !aNSIter.More();
   while(anOldShape.IsNull() && (aNSIter.More() || aUseThis)) {
     Handle(TNaming_NamedShape) aNS;
     if (aUseThis) {