X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeSelection.cpp;h=d2456c85e199fa4bb5f7838cf14d78549250d2a8;hb=f6bd0f4e080b833c0de7ef25822ebee641073445;hp=af3b9cb9d854fe384b84ee2bbf6c0e41a80e0277;hpb=1c3738ae81b02ba62136ac03a53a81a532b95141;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index af3b9cb9d..d2456c85e 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -273,6 +273,8 @@ GeomShapePtr centerByEdge(GeomShapePtr theEdge, ModelAPI_AttributeSelection::Cen std::shared_ptr Model_AttributeSelection::value() { + if (!ModelAPI_AttributeSelection::isInitialized() && !myTmpContext.get() && !myTmpSubShape.get()) + return std::shared_ptr(); CenterType aType = NOT_CENTER; std::shared_ptr aResult = internalValue(aType); return centerByEdge(aResult, aType); @@ -407,6 +409,11 @@ void Model_AttributeSelection::setID(const std::string theID) } ResultPtr Model_AttributeSelection::context() { + /* + if (!ModelAPI_AttributeSelection::isInitialized() && !myTmpContext.get() && !myTmpSubShape.get()) + return ResultPtr(); + */ + if (myTmpContext.get() || myTmpSubShape.get()) { return myTmpContext; }