
bulia byak schrieb:
This is one of the most annoying and visible recent bugs - right after clean start, the empty document is dirtied and it asks if I want to save it upon quitting. The undo stack is empty however. Can anyone please look into it? I think it's pretty recent.
Bisecting the history (gee, I love git ...) revealed that this is caused by the grids code (the bug was introduced in rev #16332). The culpable function is sp_namedview_show_grids where sodipodi:modified is set to true when the desktop/namedview is set up. I added a quick fix that suppresses changes to sodipodi:modified upon startup. Johan, could you please have lock if everything still works as intended and it doesn't break anything else?
BTW, since changing the visibility of grids/guides modifies the xml tree, Inkscape asks if the document should be saved in such a case. In most situations this is presumably intended, but in some cases it's slighty inconvenient, for instance when grids are made visible and then invisible again so that the state of the document is effectively the same as before. This also applies to other situations, like when you create a couple of objects but then decide to delete them again - see bug #1824387. It's certainly not high priority, but I was wondering if there is an easy way to detect whether some changes brought the document into the same state as, say, the latest saved one. When using undo/redo, this can easily be tested by comparing the respective locations in the undo history (commit #16491 fixes the mentioned bug in this respect). But any ideas how to find out whether the document returned to a previously saved state by "bypassing" undo, i.e. via real modifications to the document? (Maybe it wouldn't be hard to implement a kind of checksum for the xml tree; but that's probably overkill).
Max