X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI_Reference.cpp;h=445490e8faf51b5f4e0442229406e0e194a1fd30;hb=06e7f5859095193fc7f498bd89a7d28009794f53;hp=f427b7e921fe59265c042d29cbd9e38cc50a4eea;hpb=e151691ef2dae3825508a710331a11c81205f05e;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI_Reference.cpp b/src/ModelHighAPI/ModelHighAPI_Reference.cpp index f427b7e92..445490e8f 100644 --- a/src/ModelHighAPI/ModelHighAPI_Reference.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Reference.cpp @@ -1,10 +1,22 @@ -// Copyright (C) 2014-20xx 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// -// File: FeaturesAPI_Reference.cpp -// Created: 04 August 2016 -// Author: Mikhail Ponikarov - -//-------------------------------------------------------------------------------------- #include "ModelHighAPI_Reference.h" #include @@ -29,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()); + } } }