]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1941 Split auxiliary line.
authornds <nds@opencascade.com>
Thu, 26 Jan 2017 09:01:06 +0000 (12:01 +0300)
committernds <nds@opencascade.com>
Thu, 26 Jan 2017 09:01:20 +0000 (12:01 +0300)
Case: create circle in sketch, set auxiliary state, create lines contour: 1st, 3rd and 5th points are coincident to the circle. Make split of a circle segment. Call arc edit, set not auxiliary. Result it is visualized still as auxiliary.

15 files changed:
src/Model/Model_Data.cpp
src/Model/Model_Data.h
src/ModelAPI/ModelAPI_Data.h
src/ModuleBase/ModuleBase_WidgetValidated.cpp
src/ModuleBase/ModuleBase_WidgetValidated.h
src/ParametersPlugin/ParametersPlugin_EvalListener.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PartSet/PartSet_WidgetSketchLabel.h
src/SketchPlugin/SketchPlugin_Arc.cpp
src/SketchPlugin/SketchPlugin_Circle.cpp
src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp
src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Builder.cpp
src/SketchSolver/SketchSolver_ConstraintMulti.cpp
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp

index 750b9103b7de3de0bbb1dcbd0c40e50b79b913b8..a2e4a208c1fc26207ad85ce07331dd6e3a3cdf98 100644 (file)
@@ -298,8 +298,9 @@ void Model_Data::sendAttributeUpdated(ModelAPI_Attribute* theAttr)
   }
 }
 
-void Model_Data::blockSendAttributeUpdated(const bool theBlock, const bool theSendMessage)
+bool Model_Data::blockSendAttributeUpdated(const bool theBlock, const bool theSendMessage)
 {
+  bool aWasBlocked = mySendAttributeUpdated;
   if (mySendAttributeUpdated == theBlock) {
     mySendAttributeUpdated = !theBlock;
     if (mySendAttributeUpdated && !myWasChangedButBlocked.empty()) {
@@ -320,6 +321,7 @@ void Model_Data::blockSendAttributeUpdated(const bool theBlock, const bool theSe
       }
     }
   }
+  return aWasBlocked;
 }
 
 void Model_Data::erase()
index 30b7b34864011191cf7fccca50d7e688b7292b7e..f34306dcb1ce42330688b9b086f42d546ca050c5 100644 (file)
@@ -171,7 +171,8 @@ class Model_Data : public ModelAPI_Data
   /// \param theSendMessage if false, it does not send the update message
   ///            even if something is changed
   ///            (normally is it used in attributeChanged because this message will be sent anyway)
-  MODEL_EXPORT virtual void blockSendAttributeUpdated(
+  /// \returns the previous state of block
+  MODEL_EXPORT virtual bool blockSendAttributeUpdated(
     const bool theBlock, const bool theSendMessage = true);
 
   /// Puts feature to the document data sub-structure
index da516142181fd28bc8e583803ab4142db049b923..a8d19609301e6e76db140a85a5669ca78997d417 100644 (file)
@@ -129,8 +129,8 @@ class MODELAPI_EXPORT ModelAPI_Data
   /// Blocks sending "attribute updated" if theBlock is true
   /// \param theID identifier of the attribute that can be referenced by this ID later
   /// \param theAttrType type of the created attribute (received from the type method)
-  /// \returns the just created attribute
-  virtual void blockSendAttributeUpdated(
+  /// \returns the previous state of block
+  virtual bool blockSendAttributeUpdated(
     const bool theBlock, const bool theSendMessage = true) = 0;
 
   /// Erases all the data from the data model
index b0d69053ef2767afacbb20aabc1031709ea2d541..b6ce46421a2604b77805073d95956e9b2a098fb2 100644 (file)
@@ -150,9 +150,10 @@ bool ModuleBase_WidgetValidated::isValidSelectionForAttribute(
   bool aValid = false;
 
   // stores the current values of the widget attribute
-  bool isFlushesActived, isAttributeSetInitializedBlocked;
+  bool isFlushesActived, isAttributeSetInitializedBlocked, isAttributeSendUpdatedBlocked;
 
-  blockAttribute(theAttribute, true, isFlushesActived, isAttributeSetInitializedBlocked);
+  blockAttribute(theAttribute, true, isFlushesActived, isAttributeSetInitializedBlocked,
+                 isAttributeSendUpdatedBlocked);
 
   storeAttributeValue(theAttribute);
 
@@ -165,7 +166,8 @@ bool ModuleBase_WidgetValidated::isValidSelectionForAttribute(
   // restores the current values of the widget attribute
   restoreAttributeValue(theAttribute, aValid);
 
-  blockAttribute(theAttribute, false, isFlushesActived, isAttributeSetInitializedBlocked);
+  blockAttribute(theAttribute, false, isFlushesActived, isAttributeSetInitializedBlocked,
+                 isAttributeSendUpdatedBlocked);
   /// NDS: The following rows are commented for issue #1452 (to be removed after debug)
   /// This is not correct to perform it here because it might cause update selection and
   /// the selection mechanizm will be circled: use the scenario of the bug with preselected point.
@@ -229,7 +231,8 @@ bool ModuleBase_WidgetValidated::activateFilters(const bool toActivate)
 void ModuleBase_WidgetValidated::blockAttribute(const AttributePtr& theAttribute,
                                                 const bool& theToBlock,
                                                 bool& isFlushesActived,
-                                                bool& isAttributeSetInitializedBlocked)
+                                                bool& isAttributeSetInitializedBlocked,
+                                                bool& isAttributeSendUpdatedBlocked)
 {
   Events_Loop* aLoop = Events_Loop::loop();
   DataPtr aData = myFeature->data();
@@ -238,11 +241,11 @@ void ModuleBase_WidgetValidated::blockAttribute(const AttributePtr& theAttribute
     // they should not be shown in order to do not lose highlight by erasing them
     isFlushesActived = aLoop->activateFlushes(false);
 
-    aData->blockSendAttributeUpdated(true);
+    isAttributeSendUpdatedBlocked = aData->blockSendAttributeUpdated(true);
     isAttributeSetInitializedBlocked = theAttribute->blockSetInitialized(true);
   }
   else {
-    aData->blockSendAttributeUpdated(false, false);
+    aData->blockSendAttributeUpdated(isAttributeSendUpdatedBlocked, false);
     theAttribute->blockSetInitialized(isAttributeSetInitializedBlocked);
     aLoop->activateFlushes(isFlushesActived);
   }
index 71f9c8a2e1b5233092e1dd7a2e056198c93bd15b..ac8eb89eb7d5ae4774cf6f743bd5b1c6633173d1 100644 (file)
@@ -126,8 +126,10 @@ protected:
   /// to be used to restore flush state when unblocked
   /// \param isAttributeSetInitializedBlocked out value if model is blocked
   /// in value if model is unblocked to be used to restore previous state when unblocked
+  /// \param isAttributeSendUpdatedBlocked out value if model signal is blocked
   virtual void blockAttribute(const AttributePtr& theAttribute, const bool& theToBlock,
-                              bool& isFlushesActived, bool& isAttributeSetInitializedBlocked);
+                              bool& isFlushesActived, bool& isAttributeSetInitializedBlocked,
+                              bool& isAttributeSendUpdatedBlocked);
 
 private:
   /// Checks the current attibute in all attribute validators
index 428f43f8bee2c32da2266bdd0a18861041698176..ef8fa81fb4307999b8086eec468719996af2cc19 100644 (file)
@@ -140,9 +140,9 @@ void ParametersPlugin_EvalListener::renameInParameter(
                                                 theNewName);
   // Issue #588. No need for reevaluating expression.
   // Moreover, current history may not contain necessary parameters.
-  anExpressionAttribute->owner()->data()->blockSendAttributeUpdated(true);
+  bool aWasBlocked = anExpressionAttribute->owner()->data()->blockSendAttributeUpdated(true);
   anExpressionAttribute->setValue(anExpressionString);
-  anExpressionAttribute->owner()->data()->blockSendAttributeUpdated(false);
+  anExpressionAttribute->owner()->data()->blockSendAttributeUpdated(aWasBlocked);
 }
 
 void ParametersPlugin_EvalListener::renameInAttribute(
@@ -229,18 +229,18 @@ bool isValidAttribute(const AttributePtr& theAttribute)
 
 void setParameterName(ResultParameterPtr theResultParameter, const std::string& theName)
 {
-  theResultParameter->data()->blockSendAttributeUpdated(true);
+  bool aWasBlocked = theResultParameter->data()->blockSendAttributeUpdated(true);
   theResultParameter->data()->setName(theName);
-  theResultParameter->data()->blockSendAttributeUpdated(false, false);
+  theResultParameter->data()->blockSendAttributeUpdated(aWasBlocked, false);
 
   std::shared_ptr<ParametersPlugin_Parameter> aParameter =
       std::dynamic_pointer_cast<ParametersPlugin_Parameter>(
           ModelAPI_Feature::feature(theResultParameter));
 
-  aParameter->data()->blockSendAttributeUpdated(true);
+  aWasBlocked = aParameter->data()->blockSendAttributeUpdated(true);
   aParameter->data()->setName(theName);
   aParameter->string(ParametersPlugin_Parameter::VARIABLE_ID())->setValue(theName);
-  aParameter->data()->blockSendAttributeUpdated(false);
+  aParameter->data()->blockSendAttributeUpdated(aWasBlocked);
 }
 
 void ParametersPlugin_EvalListener::processObjectRenamedEvent(
index a45de9121931cd880672d529b3d5531343add30a..1daff12aed5978e8391487851d8c945011b30609 100644 (file)
@@ -211,10 +211,12 @@ void PartSet_WidgetSketchLabel::onShowConstraint(bool theOn)
 
 void PartSet_WidgetSketchLabel::blockAttribute(const AttributePtr& theAttribute,
                                                const bool& theToBlock, bool& isFlushesActived,
-                                               bool& isAttributeSetInitializedBlocked)
+                                               bool& isAttributeSetInitializedBlocked,
+                                               bool& isAttributeSendUpdatedBlocked)
 {
   ModuleBase_WidgetValidated::blockAttribute(theAttribute, theToBlock, isFlushesActived,
-                                             isAttributeSetInitializedBlocked);
+                                             isAttributeSetInitializedBlocked,
+                                             isAttributeSendUpdatedBlocked);
   // We do not restore the previous state of isAttributeSetInitializedBlocked for each of
   // attributes. It it is necessary, these states should be append to the method attributes
   // or stored in the widget
index a89a6167d39d90f22e0567c633e9e97f1c7e8451..7e0a1c73e88798100ab9ca1ee6acc62ac38ac7c7 100644 (file)
@@ -130,9 +130,11 @@ protected:
   /// to be used to restore flush state when unblocked
   /// \param isAttributeSetInitializedBlocked out value if model is blocked
   /// in value if model is unblocked to be used to restore previous state when unblocked
+  /// \param isAttributeSendUpdatedBlocked out value if model signal is blocked
   virtual void blockAttribute(const AttributePtr& theAttribute, const bool& theToBlock,
                               bool& isFlushesActived,
-                              bool& isAttributeSetInitializedBlocked);
+                              bool& isAttributeSetInitializedBlocked,
+                              bool& isAttributeSendUpdatedBlocked);
 
   /// Set the given wrapped value to the current widget
   /// This value should be processed in the widget according to the needs
index be7ad7dc72845ce56f0df6a86574181a88e2c311..3b7e41349a9b7943c05773be6fb9eeaf1e0572e7 100644 (file)
@@ -268,7 +268,7 @@ void SketchPlugin_Arc::move(double theDeltaX, double theDeltaY)
   if (!aData->isValid())
     return;
 
-  aData->blockSendAttributeUpdated(true);
+  bool aWasBlocked = aData->blockSendAttributeUpdated(true);
 
   myStartUpdate = true;
   myEndUpdate = true;
@@ -293,7 +293,7 @@ void SketchPlugin_Arc::move(double theDeltaX, double theDeltaY)
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(PASSED_POINT_ID()));
   if (aPassedPoint->isInitialized())
     aPassedPoint->move(theDeltaX, theDeltaY);
-  aData->blockSendAttributeUpdated(false);
+  aData->blockSendAttributeUpdated(aWasBlocked);
 }
 
 bool SketchPlugin_Arc::isFixed() {
@@ -418,10 +418,10 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
       std::shared_ptr<GeomAPI_Lin2d> aMiddleLine(new GeomAPI_Lin2d(aMidPnt, aMidDir));
       std::shared_ptr<GeomAPI_Pnt2d> aCenter = anOrthoLine->intersect(aMiddleLine);
       if (aCenter) {
-        data()->blockSendAttributeUpdated(true);
+        bool aWasBlocked = data()->blockSendAttributeUpdated(true);
         aCenterAttr->setValue(aCenter);
         aStartAttr->setValue(aTangPnt2d);
-        data()->blockSendAttributeUpdated(false);
+        data()->blockSendAttributeUpdated(aWasBlocked);
       }
 
       tangencyArcConstraints();
@@ -441,7 +441,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
       return;
     std::shared_ptr<GeomAPI_Circ2d> aCircleForArc(new GeomAPI_Circ2d(aCenter, aStart));
 
-    data()->blockSendAttributeUpdated(true);
+    bool aWasBlocked = data()->blockSendAttributeUpdated(true);
     // The Arc end point is projected
     // on the circle formed by center and start points
     std::shared_ptr<GeomAPI_Pnt2d> aProjection = aCircleForArc->project(anEnd);
@@ -526,12 +526,12 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
 
     // do not need to inform that other parameters were changed in this basis mode: these arguments
     // change is enough
-    data()->blockSendAttributeUpdated(false, false);
+    data()->blockSendAttributeUpdated(aWasBlocked, false);
     return;
   }
 
   if (theID == PASSED_POINT_ID()) {
-    data()->blockSendAttributeUpdated(true);
+    bool aWasBlocked = data()->blockSendAttributeUpdated(true);
 
     std::shared_ptr<GeomAPI_Pnt2d> aPoints[3];
     int aNbInitialized = 0;
@@ -551,7 +551,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
         aCenterAttr->setValue(aCenter);
       }
     }
-    data()->blockSendAttributeUpdated(false);
+    data()->blockSendAttributeUpdated(aWasBlocked);
     return;
   }
 
@@ -569,7 +569,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
         data()->attribute(RADIUS_ID()));
     double aRadius = aRadiusAttr->value();
 
-    data()->blockSendAttributeUpdated(true);
+    bool aWasBlocked = data()->blockSendAttributeUpdated(true);
     std::shared_ptr<GeomAPI_Dir2d>
       aStartDir(new GeomAPI_Dir2d(aStart->xy()->decreased(aCenter->xy())));
     std::shared_ptr<GeomAPI_XY>
@@ -580,7 +580,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
     std::shared_ptr<GeomAPI_XY>
       aNewEnd = anEndDir->xy()->multiplied(aRadius)->added(aCenter->xy());
     anEndAttr->setValue(aNewEnd->x(), aNewEnd->y());
-    data()->blockSendAttributeUpdated(false);
+    data()->blockSendAttributeUpdated(aWasBlocked);
     return;
   }
   if (theID == ANGLE_ID()) {
@@ -588,7 +588,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
       return;
     AttributeDoublePtr anAngleAttr = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
         data()->attribute(ANGLE_ID()));
-    data()->blockSendAttributeUpdated(true);
+    bool aWasBlocked = data()->blockSendAttributeUpdated(true);
     // move end point and passed point
     std::shared_ptr<GeomAPI_XY> aCenter = aCenterAttr->pnt()->xy();
     double anAngle = anAngleAttr->value() * PI / 180.0;
@@ -599,7 +599,7 @@ void SketchPlugin_Arc::attributeChanged(const std::string& theID)
         aStartDir->x() * cosA - aStartDir->y() * sinA,
         aStartDir->x() * sinA + aStartDir->y() * cosA));
     anEndAttr->setValue(aCenter->x() + aDir->x(), aCenter->y() + aDir->y());
-    data()->blockSendAttributeUpdated(false);
+    data()->blockSendAttributeUpdated(aWasBlocked);
     return;
   }
 }
index d8b4c84414004f71195926a8a65ecdb7f8cd4278..435a071cb63a4349102bbd968d94cd7640279a4a 100644 (file)
@@ -221,7 +221,7 @@ void SketchPlugin_Circle::attributeChanged(const std::string& theID) {
       data()->attribute(CIRCLE_TYPE()))->value();
     if (aType == CIRCLE_TYPE_CENTER_AND_RADIUS())
       return;
-    data()->blockSendAttributeUpdated(true); // to modify two attributes at once
+    bool aWasBlocked = data()->blockSendAttributeUpdated(true); // to modify two attributes at once
     std::shared_ptr<GeomAPI_Pnt2d> aPoints[3];
     int aNbInitialized = 0;
     for (int i = 1; i <= 3; ++i) {
@@ -255,7 +255,7 @@ void SketchPlugin_Circle::attributeChanged(const std::string& theID) {
         aRadiusAttr->setValue(aRadius);
       }
     }
-    data()->blockSendAttributeUpdated(false, false);
+    data()->blockSendAttributeUpdated(aWasBlocked, false);
 
   } else if (theID == CIRCLE_TYPE()) { // if switched to 3 points mode, adjust the needed attributes
     std::string aType = std::dynamic_pointer_cast<ModelAPI_AttributeString>(
@@ -277,7 +277,7 @@ void SketchPlugin_Circle::adjustThreePoints()
   if (!aRadiusAttr->isInitialized())
     return;
 
-  data()->blockSendAttributeUpdated(true);
+  bool aWasBlocked = data()->blockSendAttributeUpdated(true);
   std::shared_ptr<GeomDataAPI_Point2D> aFirstPnt =
       std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(FIRST_POINT_ID()));
   std::shared_ptr<GeomDataAPI_Point2D> aSecondPnt =
@@ -297,5 +297,5 @@ void SketchPlugin_Circle::adjustThreePoints()
     aSecondPnt->setValue(aCenterAttr->x(), aCenterAttr->y() + aRadius);
     aThirdPnt->setValue(aCenterAttr->x() - aRadius, aCenterAttr->y());
   }
-  data()->blockSendAttributeUpdated(false, false);
+  data()->blockSendAttributeUpdated(aWasBlocked, false);
 }
index 4015ca52a1ba1f03e65402c4ac48c281ae225508..83fde70e8d726f633cc2489456456e400e42ae72 100644 (file)
@@ -290,7 +290,7 @@ void SketchPlugin_ConstraintFillet::execute()
     // update fillet arc: make the arc correct for sure, so, it is not needed to
     // process the "attribute updated"
     // by arc; moreover, it may cause cyclicity in hte mechanism of updater
-    aResultArc->data()->blockSendAttributeUpdated(true);
+    bool aWasBlocked = aResultArc->data()->blockSendAttributeUpdated(true);
     std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
       aResultArc->attribute(SketchPlugin_Arc::CENTER_ID()))->setValue(aCenter->x(), aCenter->y());
     if(isReversed) {
@@ -310,7 +310,7 @@ void SketchPlugin_ConstraintFillet::execute()
     }
     aStartPoint->setValue(aTangentPntA->x(), aTangentPntA->y());
     aEndPoint->setValue(aTangentPntB->x(), aTangentPntB->y());
-    aResultArc->data()->blockSendAttributeUpdated(false);
+    aResultArc->data()->blockSendAttributeUpdated(aWasBlocked);
     aResultArc->execute();
 
     if(anIsNeedNewObjects) {
index 32199abce256870049b612d95c94b8459bef9566..b8a7102d9c8a5c817b4634c1eb8c8d060da4f0cc 100755 (executable)
@@ -1228,7 +1228,7 @@ FeaturePtr SketchPlugin_ConstraintSplit::createArcFeature(const FeaturePtr& theB
   // update fillet arc: make the arc correct for sure, so, it is not needed to process
   // the "attribute updated"
   // by arc; moreover, it may cause cyclicity in hte mechanism of updater
-  aFeature->data()->blockSendAttributeUpdated(true);
+  bool aWasBlocked = aFeature->data()->blockSendAttributeUpdated(true);
 
   aFeature->string(SketchPlugin_Arc::ARC_TYPE())->setValue(
                 SketchPlugin_Arc::ARC_TYPE_CENTER_START_END());
@@ -1246,7 +1246,7 @@ FeaturePtr SketchPlugin_ConstraintSplit::createArcFeature(const FeaturePtr& theB
     bool aReversed = theBaseFeature->boolean(SketchPlugin_Arc::INVERSED_ID())->value();
     aFeature->boolean(SketchPlugin_Arc::INVERSED_ID())->setValue(aReversed);
   }
-  aFeature->data()->blockSendAttributeUpdated(false);
+  aFeature->data()->blockSendAttributeUpdated(aWasBlocked);
   aFeature->execute(); // to obtain result
 
   return aFeature;
index c708e70285107c491d981e6a9a5335c205805bfb..743d843e41554359e908b15d195fe52e85155983 100644 (file)
@@ -390,7 +390,7 @@ std::list<ConstraintWrapperPtr> PlaneGCSSolver_Builder::createMirror(
     // Do not allow mirrored arc recalculate its position until
     // coordinated of all points recalculated
     FeaturePtr aMirrArc = theEntity2->baseFeature();
-    aMirrArc->data()->blockSendAttributeUpdated(true);
+    bool aWasBlocked = aMirrArc->data()->blockSendAttributeUpdated(true);
 
     // Make mirror for center and start point of original arc
     std::list<ConstraintWrapperPtr> aMrrList;
@@ -450,7 +450,7 @@ std::list<ConstraintWrapperPtr> PlaneGCSSolver_Builder::createMirror(
     aResult.push_back(aSubResult);
 
     // Restore event sending
-    aMirrArc->data()->blockSendAttributeUpdated(false);
+    aMirrArc->data()->blockSendAttributeUpdated(aWasBlocked);
   }
   return aResult;
 }
index dbc5b6c89a9e5307933927e2a1a5325e1dea9780..a86ab8b5fbd51731f26d30fdade40e31a67a402d 100644 (file)
@@ -161,8 +161,9 @@ void SketchSolver_ConstraintMulti::adjustConstraint()
         continue;
       anEntity = myStorage->entity(aFeature);
 
+      bool aWasBlocked = false;
       if (!anEntity || !myStorage->isEventsBlocked())
-        aFeature->data()->blockSendAttributeUpdated(true);
+        aWasBlocked = aFeature->data()->blockSendAttributeUpdated(true);
 
       std::list<AttributePtr> aPoints;
       if (aFeature->getKind() == SketchPlugin_Arc::ID()) {
@@ -203,7 +204,7 @@ void SketchSolver_ConstraintMulti::adjustConstraint()
       }
 
       if (!anEntity || !myStorage->isEventsBlocked())
-        aFeature->data()->blockSendAttributeUpdated(false);
+        aFeature->data()->blockSendAttributeUpdated(aWasBlocked);
     }
   }
 
index 814987bccd9799067e56ad2ecfb405f76b890d18..babba23da2091c57f7adc31ac967b8a8f2ba3952 100644 (file)
@@ -260,7 +260,7 @@ std::list<ConstraintWrapperPtr> SolveSpaceSolver_Builder::createMirror(
     // Do not allow mirrored arc recalculate its position until
     // coordinated of all points recalculated
     FeaturePtr aMirrArc = theEntity2->baseFeature();
-    aMirrArc->data()->blockSendAttributeUpdated(true);
+    bool aWasBlocked = aMirrArc->data()->blockSendAttributeUpdated(true);
 
     std::list<ConstraintWrapperPtr> aMrrList;
     std::list<EntityWrapperPtr>::const_iterator anIt1 = theEntity1->subEntities().begin();
@@ -283,7 +283,7 @@ std::list<ConstraintWrapperPtr> SolveSpaceSolver_Builder::createMirror(
       aResult.insert(aResult.end(), aMrrList.begin(), aMrrList.end());
     }
     // Restore event sending
-    aMirrArc->data()->blockSendAttributeUpdated(false);
+    aMirrArc->data()->blockSendAttributeUpdated(aWasBlocked);
   }
   return aResult;
 }