From dc0c150211e0c64183aab3f7a21604d07b07a2df Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 19 Oct 2021 12:41:23 +0300 Subject: [PATCH 1/1] [bos #26534] EDF 24265 - Problem of recover in TUI --- src/FeaturesAPI/FeaturesAPI_Recover.cpp | 4 ++-- src/ModelHighAPI/ModelHighAPI_Reference.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/FeaturesAPI/FeaturesAPI_Recover.cpp b/src/FeaturesAPI/FeaturesAPI_Recover.cpp index b4de32a66..15d1ff9ca 100644 --- a/src/FeaturesAPI/FeaturesAPI_Recover.cpp +++ b/src/FeaturesAPI/FeaturesAPI_Recover.cpp @@ -37,12 +37,12 @@ FeaturesAPI_Recover::FeaturesAPI_Recover(const std::shared_ptr const bool theRecoverCompound) : ModelHighAPI_Interface(theFeature) { - if(initialize()) { + if (initialize()) { std::string aMethod = theRecoverCompound ? FeaturesPlugin_Recover::METHOD_COMPOUND() : FeaturesPlugin_Recover::METHOD_DEFAULT(); fillAttribute(aMethod, theFeature->string(FeaturesPlugin_Recover::METHOD())); - setBaseFeature(theBaseFeature); + fillAttribute(theBaseFeature.feature(), mybaseFeature); setRecoveredList(theRecoveredList); } } diff --git a/src/ModelHighAPI/ModelHighAPI_Reference.cpp b/src/ModelHighAPI/ModelHighAPI_Reference.cpp index 3d4df7a10..b381d4fd7 100644 --- a/src/ModelHighAPI/ModelHighAPI_Reference.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Reference.cpp @@ -41,6 +41,11 @@ ModelHighAPI_Reference::ModelHighAPI_Reference( if (!myObject) { theValue->execute(true); myObject = std::shared_ptr(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(theValue->feature()); + } } } -- 2.30.2