]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelAPI/ModelAPI_Tools.cpp
Salome HOME
Issue #20456: Another dump study fails
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.cpp
index 8c03b9ab3007f957e04ad704c09954659464e79d..c5985e310984f62d253f2ccac65e939a81a72bc0 100644 (file)
@@ -617,7 +617,8 @@ void getConcealedResults(const FeaturePtr& theFeature,
 }
 
 std::pair<std::wstring, bool> getDefaultName(const std::shared_ptr<ModelAPI_Result>& theResult,
-                                            const bool theInherited)
+                                             const bool theInherited,
+                                             const bool theRecursive)
 {
   typedef std::list< std::pair < std::string, std::list<ObjectPtr> > > ListOfReferences;
 
@@ -707,7 +708,7 @@ std::pair<std::wstring, bool> getDefaultName(const std::shared_ptr<ModelAPI_Resu
       // return name of reference result only if it has been renamed by the user,
       // in other case compose a default name
       if (anObjRes->data()->hasUserDefinedName() ||
-          anObjRes->data()->name() != getDefaultName(anObjRes).first) {
+          (theRecursive && anObjRes->data()->name() != getDefaultName(anObjRes).first)) {
         std::wstringstream aName;
         aName << anObjRes->data()->name();
         std::map<ResultPtr, int>::iterator aFound = aNbRefToObject.find(anObjRes);