Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
The undo stack compression currently does not handle "empty" commands well.
This can happen when mergeWith() is called and the user "manually" undid what he did before.
In this case it would be nice to remove the last undo command on the stack after a successful merge that results in an empty command.
It could be implemented by adding an isEmpty() virtual method to QUndoCommand (that is false by default) - the QUndoStack could handle this gracefully then.
To make things worse, i cannot really workaround this, because there is no way to remove the last command on the stack, even if i called undo().
As a workaround, it would be nice to be able to clean the undo stack of undone commands, so i also support QTBUG-15764
(this would at least allow me to implement the desired behaviour without changing Qt source code)
Attachments
Issue Links
- relates to
-
QTBUG-15764 Extend the Undo framework to delete undone commands
-
- Open
-