Closed amolenaar closed 3 years ago
There are two problem scenario's.
subject
sanitize service
When undoing:
When this is undone, first it's trying to create a relation with an element that no longer exists.
The solution proved simpler. The undo events need to be ordered: create elements, then set properties and lastly unlink (remove) elements. This is basically the same order we use for loading models and copy/paste functionality.
The options above has the big disadvantage that events could only be sent after all effects were applied. This made it hard to undo the effects. Now undoing can still be done close to where the event happened. The undo mechanism only had to be a little smarter.
Describe the bug
Deleting a model element and then performing an undo action causes the diagram item to be shown, but it's not backed by a model element.
To Reproduce Steps to reproduce the behavior:
Expected behavior
It to work properly.
Version Version of Gaphor: 2.2.1