From: jfa Date: Tue, 19 Oct 2021 09:41:23 +0000 (+0300) Subject: [bos #26534] EDF 24265 - Problem of recover in TUI X-Git-Tag: V9_8_0b1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dc0c150211e0c64183aab3f7a21604d07b07a2df;p=modules%2Fshaper.git [bos #26534] EDF 24265 - Problem of recover in TUI --- 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()); + } } }