From: nds Date: Tue, 15 Dec 2015 12:58:14 +0000 (+0300) Subject: #1123 Cancel constraint after preview: the edge does not go back to its previous... X-Git-Tag: V_2.1.0~178 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0ade576714888ca38bd8e4766ad990773ea41124;p=modules%2Fshaper.git #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. --- 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