From 9fe3748bc4dcb7baaf43764af9b759ba4ea8f92a Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 22 Aug 2016 12:26:43 +0300 Subject: [PATCH] Correct dump of default name of results --- src/ModelHighAPI/ModelHighAPI_Dumper.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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) { -- 2.39.2