Nonintuitive choices for "dirty" flag

• Mar 27, 2015 - 00:38

I'm referring to the "document has been modified" flag that puts up the star and queries if you close, and in general enables/requires write-out.

Changing mixer settings doesn't dirty the document; it should; those are part of the score.

Changing between continuous and page mode dirties the document; it should not, as far as I am concerned. I just wanna look at it, not write a new version!

Flipping between the concert-pitch and "transposing" partial-documents should not dirty the document, either.

These two things are, as far as I am concerned, session parameters, not document artifacts.


Comments

There is a reason flipping concert pitch or page / continuous mode sets the dirty flag, and that is because it does represent an actual change to your score internally even if you don't necessary *think* of it that way. And the fact that it is an internal changes means these must be undoable. Originally they were not, and this caused all sorts of problems if you performed an operation in one mode, then switched modes, then pressed "undo". We'd try to undo an operation that was not originally performed in this mode, and the results would often not be as expected (to put it kindly; often it crashed). So the fix was to make these toggles into undoable operations, so that in the scenario I just described, the first press of "undo" puts the mode back where it was, then the second undoes the previous operation.

And the relevance is, "pending undo" is actually hwo the dirty flag is implemented. Any undable operation triggers it. So pretty much you have a chocie - bugs in undo (very bad), or toggling concert pitchmarks score dirty (slightly annoying, but nowhere near as the bugs that are inherent in allowing undo of an operation not relevant in current mode).

This also explains the mixer situations. Currently, mixer settings are not undoabe. They should be and hoepfully will be at some point - see #45141: [Feature Request] Include mixer changes in undo history. And then these will also set the score dirty.

Do you still have an unanswered question? Please log in first to post your question.