Diagram.ownedPresentation
and Presentation.diagram
do not behave as normal relationships
#1083
Labels
Milestone
Adding a listener for
diagram.ownedPresentation
does only work for delete events.On creation, event submission is suppressed during the creation of a diagram item. A diagram item gets a
diagram
on construction and can not exist without a diagram being set. However, since events are suppressed, services likeEventDispatcher
do not detect updates on the structure and are therefore unaware of changes inDiagram.ownedPresentation
.The reason events are suppressed during construction is that a model element should first be announced via an ElementCreated event. that is the point an element is available from our repository (element factory) That way we know an element exists and the undo manager can track it accordingly.
On the
Presentation.diagram
item side this is not a problem: there are no listeners for this specific item while it's being created.Since Presentations are now normal model elements, managed by ElementFactory, it would be good if their properties expose the same behavior.
Version
Version of Gaphor: 2.x
The text was updated successfully, but these errors were encountered: