]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix "incorrect selection" error message when changing edge on solid to separate edge...
authormpv <mpv@opencascade.com>
Mon, 28 May 2018 06:50:09 +0000 (09:50 +0300)
committerazv <azv@opencascade.com>
Tue, 29 May 2018 11:22:45 +0000 (14:22 +0300)
src/Model/Model_AttributeSelection.cpp

index 93a9b24bbe28e64cb0cf8a0588e01b4b9d0562e7..af3b9cb9d854fe384b84ee2bbf6c0e41a80e0277 100644 (file)
@@ -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;
 }