Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sketcher: Internal Transaction Support and ensure valid constraint ge…
…ometry indices =================================================================================== On changing the geometry property (for example from Python), the constraints geometry indices was not rebuild in order to avoid redundant and unnecessary rebuilds. However, this might cause crashes, as the status of the sketch (or its properties) may be invalid. It also refactors into OnChanged common functionality. This commit does NOT solve that the user may be inserting invalid geometry indices to the First/Second/Third of Constraints (invalid input). Only makes sure that geometry indices (geometry types) of PropertyConstraintList match the geometry. Solution: 1. Force the rebuild of the constraint geometry indices upon assignment of new Geometry. 2. Force the rebuild of the constraint geometry indices upon assigment of constraints, if they result in invalid geometry indices. 3. Introduce the concept of internal transaction to avoid those rebuilds, checks and updates in case of an ongoing internal transaction, thereby preventing them as it was done before introducing 1 and 2 (in the case of SketchObject internal transactions).
- Loading branch information