From: mpv Date: Tue, 2 Jun 2015 05:20:54 +0000 (+0300) Subject: Fix for the issue #592 X-Git-Tag: V_1.2.1~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fdecb9160cb53eab291b3612b72c6aa44310e489;p=modules%2Fshaper.git 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. --- 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 {