]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelHighAPI/ModelHighAPI_Reference.cpp
Salome HOME
updated copyright message
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Reference.cpp
index 45ca2da3141c12afeb41ba23214406dff35e326e..445490e8faf51b5f4e0442229406e0e194a1fd30 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -41,6 +41,11 @@ ModelHighAPI_Reference::ModelHighAPI_Reference(
   if (!myObject) {
     theValue->execute(true);
     myObject = std::shared_ptr<ModelAPI_Object>(theValue->defaultResult());
+    if (!myObject) {
+      // [bos #26534] EDF 24265 - Problem of recover in TUI
+      // Feature can have no results, store the feature itself
+      myObject = std::shared_ptr<ModelAPI_Object>(theValue->feature());
+    }
   }
 }