Reputation: 8172
When the user saves changes in an application, should the undo/redo stacks be cleared? Would it be abnormal to be able to undo to a state before a save?
Upvotes: 0
Views: 378
Reputation: 38189
I can't think of an app where save clears the undo/redo stack. I don't see a good reason to do that; it gains nothing for you, but the user loses something.
Upvotes: 0
Reputation: 16226
Personally I don't like when the undo stack is cleared after a save. When programming I hit Ctrl-S very often (everybody knows the importance of saving:-)) and at the same time I want to be able to undo some of the recent changes.
In my opinion it is an unpleasant surprise not to be able to undo after a save. And by applying a rule of the least surpirse (to the user) you should keep the undo history.
Upvotes: 0
Reputation: 287805
That would be a bad idea, especially for people (like me) who often instinctively save. Also, there is no logical reason why undo/redo information should be deleted when saving (and any data gained from the user is precious).
It is common practice, however, not to include undo/redo information in the saved file.
Upvotes: 3
Reputation: 6167
I would say the answer to both of these questions is no.
(For instance, what if you change something, save it, and then discover it leads to unwanted behaviour? It makes sense to be able to uncommit that save by undoing your changes to the previous state, allowing you to save them.)
Upvotes: 0