]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #2851 : cloison07 dump produces an error
authormpv <mpv@opencascade.com>
Tue, 5 Feb 2019 13:29:15 +0000 (16:29 +0300)
committermpv <mpv@opencascade.com>
Tue, 5 Feb 2019 13:30:59 +0000 (16:30 +0300)
src/Model/Model_Document.cpp

index 2fbfac44901166c19f5285017626a5170a3a4546..2cbfce82c5ea139a7bc2ee9aaeda2c61b34d24ac 100755 (executable)
@@ -1516,7 +1516,7 @@ void Model_Document::changeNamingName(const std::string theOldName,
           Handle(TDataStd_Name) aSubName = Handle(TDataStd_Name)::DownCast(aChild.Value());
           std::string aName = TCollection_AsciiString(aSubName->Get()).ToCString();
           if (aName.find(theOldName) == 0) { // started from parent name
-            std::string aNewSubName = theNewName + aName.substr(theNewName.size());
+            std::string aNewSubName = theNewName + aName.substr(theOldName.size());
             changeNamingName(aName, aNewSubName, aSubName->Label());
             aSubName->Set(aNewSubName.c_str());
           }