Skip to content

Rewrite Cumulative Undo to make it more robust and understandable for the user

The original implementation of cumulative undo was based on undo stack indexes, which could be easily messed up when the commands are merged/ pushed out using the undo limit. This new implementation removes all the saved indexes and calculated the invariants on-the-fly.

The patch also changed the semantics of cumulative undo a little bit. Now the meaning of options is greatly simplified:

  1. Krita starts to merge strokes which are deeper than N steps in the undo history or which are older than T1 seconds.

  2. The strokes are considered to belong to the same group if the separation between them is smaller than T2 seconds.

BUG:460109

Merge request reports