Undo / isModified issue

There seems to be a problem with the diagram.isModified calculated property when I:

  • add a node to a diagram
  • save that model
  • undo the adding of that node via diagram.model.undoManager.undo()
  • adding another node to the diagram
  • checking the diagram.isModified property
After the scenario above the diagram.isModified property is set to false, whilst I expected it to be true.

Following is the test source (with GoJS version 1.4.8; but problems also occur on older versions) that illustrates the problem:

Click on the buttons Add1, Save, Undo, Add2 (in that order).

Reset
Modified: No (as returned by the Modified event)
Last action: 
Add1 Save Undo Add2

Check

Usually any confusion is caused by a transaction being open/ongoing, which automatically causes Diagram.isModified to be true. However that is not the case here. We’ll need to investigate further.

Thank you very much for reporting this bug along with an easily reproducible test case!
I believe this bug will be fixed for version 1.4.9, which should be coming out within a week.

Thanks

Please try http://gojs.net/latest, which should have this bug fix.

Thanks again for reporting it so nicely!