From 0ade576714888ca38bd8e4766ad990773ea41124 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 15 Dec 2015 15:58:14 +0300 Subject: [PATCH] #1123 Cancel constraint after preview: the edge does not go back to its previous position In the previous case(create, delete) in the bug scenario, logic was the following: 1. The constraint feature is removed from the model, values are aborted by document. Values are correct. 2. signal created emulate signal updated. Sketch solver listens it and updates features values according to constraint(the solver did not accept delete and has knowledge about constraint) 3. signal delete is listened by solver. It removes constraint. However values of the features are modified as the constraint is applyed. So, the solver need to obtain delete signal before create/update. --- src/Model/Model_Objects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index 03e7bdee9..b083c265c 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -716,8 +716,8 @@ void Model_Objects::synchronizeFeatures( aLoop->activateFlushes(isActive); if (theFlush) { - aLoop->flush(aCreateEvent); aLoop->flush(aDeleteEvent); + aLoop->flush(aCreateEvent); // delete should be emitted before create to reacts to aborted feature aLoop->flush(anUpdateEvent); aLoop->flush(aCreateEvent); // after update of features, there could be results created aLoop->flush(aDeleteEvent); // or deleted -- 2.39.2