ZMYaro / paintz

A simple drawing app that runs in a web browser, designed to be an MS Paint substitute for Chromebooks and other Chrome OS devices. PaintZ is free, but please consider supporting development at https://ko-fi.com/ZMYaro or https://patreon.com/ZMYaro.
https://paintz.app
53 stars 11 forks source link

Reducing the maximum number of undo levels does not immediately prune the undo stack #219

Closed ZMYaro closed 3 years ago

ZMYaro commented 3 years ago

Steps to reproduce the behavior

  1. Make x changes to the drawing, fewer than the current undo limit.
  2. Open the settings dialog and reduce the maximum number of undo levels to a number, y, that is less than x.
  3. Save changes.
  4. Attempt to undo all changes.

Expected behavior You can only undo y changes.

Actual behavior You can still undo x changes.

(Caught by David Martin.)

ZMYaro commented 3 years ago

Fixed in https://github.com/ZMYaro/paintz/commit/b4afac61aa4203a2d1c780e9b166351b3bb0b3f6.

Note: The redo stack will still not be pruned, but if it is larger than the undo stack, the undo stack will be pruned as the redos are applied.