Salome HOME
Make names work of result-shapes even they are in "Modified" state.
authormpv <mpv@opencascade.com>
Thu, 14 Dec 2017 11:05:16 +0000 (14:05 +0300)
committermpv <mpv@opencascade.com>
Thu, 14 Dec 2017 11:05:16 +0000 (14:05 +0300)
src/Model/Model_Document.cpp

index c422dcf526c085a63aef1a4116c1ec1dddf5384e..f37533c07150b781100ada7f8fd1dd8bc598063b 100755 (executable)
@@ -1431,6 +1431,13 @@ TDF_Label Model_Document::findNamingName(std::string theName, ResultPtr theConte
               return aName->Label();
             }
           }
+          // check also "this" label
+          Handle(TDataStd_Name) aName;
+          if (aLabIter->FindAttribute(TDataStd_Name::GetID(), aName)) {
+            if (aName->Get() == aSubName) {
+              return aName->Label();
+            }
+          }
         }
       }
     }