From e69674bc0a1fa6a9e982658bb156f9adbc2c78ff Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 13 Sep 2018 08:50:33 +0300 Subject: [PATCH] Python Dump: improve checking default name of a feature when there are postponed features of such kind. --- src/ModelHighAPI/ModelHighAPI_Dumper.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp index 304a95b97..c60d67e77 100644 --- a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp @@ -164,6 +164,17 @@ const std::string& ModelHighAPI_Dumper::name(const EntityPtr& theEntity, if (aNbFeatures.first == anId && aNbFeatures.second < anId) { // name is not user-defined isDefaultName = true; + + // check there are postponed features of this kind, + // dump their names, because the sequence of features may be changed + for (std::list::const_iterator aPpIt = myPostponed.begin(); + aPpIt != myPostponed.end(); ++aPpIt) { + FeaturePtr aCurFeature = std::dynamic_pointer_cast(*aPpIt); + if (aCurFeature && aCurFeature->getKind() == aKind) { + myNames[*aPpIt].myIsDefault = false; + isDefaultName = false; + } + } } if (anId > aNbFeatures.second) -- 2.39.2