What's the best way to see what triggered `Modified` event?

I’m trying to debug why a diagram isModified is set to true right after the canvas renders. It’s definitely something that we’re doing wrong but I just need to figure out why and when.

I tried attaching a addDiagramListener handler as early as possible and I do see the Modified event being called but I can’t tell why. The subject is null and name is Modified. Is there anything I can inspect to see what caused this event?

Whenever there’s a Model Changed transaction event (ChangedEvent with ChangedEvent.model being non-null and ChangedEvent.change being Transaction) each Diagram, when ChangedEvent.isTransactionFinished and when the value of Diagram.isModified changes, will raise the “Modified” DiagramEvent.

So you could (temporarily?) implement a “ModelChanged” DiagramEvent listener (or call Diagram.addModelChangedListener) and notice what model changes are happening and when.