X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultPart.cpp;h=1ec015c90c4d117a2c83468d615fbb35d383f6ef;hb=6958dab7cbbaf443a39b04a609c5f33573c73f9e;hp=3032d6f9de0ae1d7aabcfc39046d8636ebcfc545;hpb=9e869ede4d8c56262bb20534543c2bf56cd6a91b;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultPart.cpp b/src/Model/Model_ResultPart.cpp index 3032d6f9d..1ec015c90 100644 --- a/src/Model/Model_ResultPart.cpp +++ b/src/Model/Model_ResultPart.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModelAPI_ResultPart.cpp // Created: 07 Jul 2014 // Author: Mikhail PONIKAROV @@ -34,7 +36,7 @@ void Model_ResultPart::activate() { std::shared_ptr aDocRef = data()->document(DOC_REF()); - if (!aDocRef->value()) { // create (or open) a document if it is not yet created + if (!aDocRef->value().get()) { // create (or open) a document if it is not yet created std::shared_ptr aDoc = document()->subDocument(data()->name()); if (aDoc) { aDocRef->setValue(aDoc); @@ -43,3 +45,9 @@ void Model_ResultPart::activate() if (aDocRef->value()) ModelAPI_Session::get()->setActiveDocument(aDocRef->value()); } + +bool Model_ResultPart::isActivated() +{ + std::shared_ptr aDocRef = data()->document(DOC_REF()); + return aDocRef->value().get(); +}