From fdecb9160cb53eab291b3612b72c6aa44310e489 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 2 Jun 2015 08:20:54 +0300 Subject: [PATCH] Fix for the issue #592 Multiselection widget may send null shape that means equal result and context. This will be fixed to null object always later. --- src/Model/Model_AttributeSelection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 4818b3a57..852bba227 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -103,7 +103,10 @@ void Model_AttributeSelection::setValue(const ResultPtr& theContext, } if (theContext->groupName() == ModelAPI_ResultBody::group()) { // do not select the whole shape for body:it is already must be in the data framework - if (theContext->shape().get() && theContext->shape()->isEqual(theSubShape)) { + // equal and null selected objects mean the same: object is equal to context, + // TODO: synchronize with GUI later that it must be null always + if (theContext->shape().get() && + (theContext->shape()->isEqual(theSubShape) || !theSubShape.get())) { aSelLab.ForgetAllAttributes(true); TDataStd_UAttribute::Set(aSelLab, kSIMPLE_REF_ID); } else { -- 2.39.2