From: mpv Date: Mon, 28 May 2018 06:50:09 +0000 (+0300) Subject: Fix "incorrect selection" error message when changing edge on solid to separate edge... X-Git-Tag: EDF_2018-1~33^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=65f7627d533355a594f5508808bd1fdeb19e5da5;p=modules%2Fshaper.git Fix "incorrect selection" error message when changing edge on solid to separate edge in Projection or Intersection feature --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 93a9b24bb..af3b9cb9d 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -111,9 +111,11 @@ bool Model_AttributeSelection::setValue(const ResultPtr& theContext, bool isOldShape = isOldContext && (theSubShape == anOldShape || (theSubShape && anOldShape && theSubShape->isEqual(anOldShape))); if (isOldShape) return false; // shape is the same, so context is also unchanged + bool aToUnblock = false; // update the referenced object if needed if (!isOldContext) { - myRef.setValue(theContext); + aToUnblock = !owner()->data()->blockSendAttributeUpdated(true); + myRef.setValue(theContext); } // do noth use naming if selected shape is result shape itself, but not sub-shape @@ -136,6 +138,8 @@ bool Model_AttributeSelection::setValue(const ResultPtr& theContext, TDF_Label aRefLab = myRef.myRef->Label(); aSelLab.ForgetAllAttributes(true); myRef.myRef = TDF_Reference::Set(aSelLab.Father(), aSelLab.Father()); + if (aToUnblock) + owner()->data()->blockSendAttributeUpdated(false); return false; } if (theContext->groupName() == ModelAPI_ResultBody::group()) { @@ -170,6 +174,10 @@ bool Model_AttributeSelection::setValue(const ResultPtr& theContext, } owner()->data()->sendAttributeUpdated(this); + + if (aToUnblock) + owner()->data()->blockSendAttributeUpdated(false); + return true; }