X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI_Reference.cpp;h=f427b7e921fe59265c042d29cbd9e38cc50a4eea;hb=2054879244f3323c305222c79c57d2db6a487538;hp=3e13a0b463d95f32fef462b83c9500c287d0d2d8;hpb=0cf033e3d2d9a6419aac40d77cd200187562a159;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI_Reference.cpp b/src/ModelHighAPI/ModelHighAPI_Reference.cpp index 3e13a0b46..f427b7e92 100644 --- a/src/ModelHighAPI/ModelHighAPI_Reference.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Reference.cpp @@ -25,6 +25,11 @@ ModelHighAPI_Reference::ModelHighAPI_Reference( const std::shared_ptr & theValue) : myObject(std::shared_ptr(theValue->defaultResult())) { + // the result is not constructed yet, forcibly do it + if (!myObject) { + theValue->execute(true); + myObject = std::shared_ptr(theValue->defaultResult()); + } } ModelHighAPI_Reference::~ModelHighAPI_Reference() @@ -44,3 +49,9 @@ void ModelHighAPI_Reference::appendToList( { theAttribute->append(myObject); } + +//-------------------------------------------------------------------------------------- +std::shared_ptr ModelHighAPI_Reference::feature() const +{ + return ModelAPI_Feature::feature(myObject); +}