From: mpv Date: Tue, 5 Feb 2019 13:29:15 +0000 (+0300) Subject: Fix for the issue #2851 : cloison07 dump produces an error X-Git-Tag: HighLevelObjectsHierarchy~13^2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ff6d7db1ec0fcdbd73a2e0fa4a32d831fea7366c;p=modules%2Fshaper.git Fix for the issue #2851 : cloison07 dump produces an error --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 2fbfac449..2cbfce82c 100755 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -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()); }