From: azv Date: Mon, 22 Aug 2016 09:26:43 +0000 (+0300) Subject: Correct dump of default name of results X-Git-Tag: V_2.5.0~137^2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9fe3748bc4dcb7baaf43764af9b759ba4ea8f92a;p=modules%2Fshaper.git Correct dump of default name of results --- diff --git a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp index 52b9fab36..3799f614f 100644 --- a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp @@ -127,14 +127,16 @@ const std::string& ModelHighAPI_Dumper::name(const EntityPtr& theEntity, } aDefaultName << aKind << "_" << aFullIndex; } - - // store names of results - saveResultNames(aFeature); } myNames[theEntity] = std::pair(aDefaultName.str(), aName); if (theSaveNotDumped) myNotDumpedEntities.insert(theEntity); + + // store names of results + if (aFeature) + saveResultNames(aFeature); + return myNames[theEntity].first; } @@ -155,7 +157,7 @@ const std::string& ModelHighAPI_Dumper::parentName(const FeaturePtr& theEntity) void ModelHighAPI_Dumper::saveResultNames(const FeaturePtr& theFeature) { - std::string aFeatureName = theFeature->name(); + const std::string& aFeatureName = myNames[theFeature].first; const std::list& aResults = theFeature->results(); std::list::const_iterator aResIt = aResults.begin(); for (int i = 1; aResIt != aResults.end(); ++aResIt, ++i) {