From: azv Date: Thu, 13 Sep 2018 05:50:33 +0000 (+0300) Subject: Python Dump: improve checking default name of a feature when there are postponed... X-Git-Tag: V9_2_0a1~39 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e69674bc0a1fa6a9e982658bb156f9adbc2c78ff;p=modules%2Fshaper.git Python Dump: improve checking default name of a feature when there are postponed features of such kind. --- 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)