FreeCAD: master 36fdbc46
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
abdullah | abdullah | master | 2021-02-09 06:48:27 | master 41a40c1c |
Changeset | Sketcher: Geometry state synchronisation ======================================== The geometry state stored in the geometryFacade is modified following a mutable model (without setting the Geometry property on Constraint change), in order to avoid coupling the addition/removal of a constraint with a change of the Geometry Property. This design decision however interferes with the ability of the Geometry property to restore the correct geometry state upon redo/undo. While such a situation is rare in the case of Internal Alignment geometry, because constraint addition/removal is performed with the corresponding geometry addition/removal (within the same transaction. That is not the case with the Block constraint (or another future general case where the geometry state may be applied). This commit leverages the synchronisation mechanism already in use for non-properties (e.g. external geometry or vertex indices) to check and synchronise geometry state upon undo/redo and restore. Bonus: - addGeometryState is refactored to separate the checking logic from the setting logic. |
|||
mod - src/Mod/Sketcher/App/SketchObject.cpp | Diff File | |||
mod - src/Mod/Sketcher/App/SketchObject.h | Diff File |