How to recognize what node has been modified

Hello, Walter.

My model is set be modified right after model loaded and so on.
Even When I moved the mouse pointer over several edges and nodes.

I think I should block several code blocks more using ‘d.skipsUndoManager()’ or ‘d.startTransaction()’.
But I cannot find where is needed.
I have seen this problem for a long time and now it is time to resolve it.

Can I recognize what (data in model) is modified in the listener function for ‘ModelChanged’ or ‘Modified’?

I found that several members in data that is used only for UI rendering not for data has being updated while dragging mouse (moving viewport).

And they set the status of the model to ‘modified’.

For example, ‘Node.loc’ and ‘Group.isSubGraphExpanded’ has being updated while moving viewport and it looks fire ‘Modified’ event.
But ‘points’ is not making ‘Modified’, it’s strange.

Please help me.
Let me know how I block them ‘loc’ and ‘isSubgraphExpanded’ that to make not to be modified the model.

Do you have a “ViewportBoundsChanged” DiagramEvent listener? If you comment it out, does the “Modified” problem not happen? If so, what does that listener do?

1 Like

Yes, I have ‘ViewportBoundsChanged’ listener.
And the listener works quite many things related with optimization.
I have quite big model that has over 1000 nodes and its related parts(links).

I made ‘ViewportBoundsChanged’ listener to show only parts put in current viewport and hide others outside of current viewport.

Finally, I found that the ‘Modified’ problem is not happening any more by commenting it out. (thanks)
I should disable the implementation related with the optimization.
I need more analysis for this.
I’ll be in touch again if I need later.

But I have still another ‘Modified’ problem similar it.
I think I should make another topic to divide it with this clearly.

Thank you, walter.