Skip to content

Mark document as modified if the undo history is cleared

Sharaf Zaman requested to merge szaman/krita:undo-mark-document-modified into master

Previously, if the undo history is cleared (eg. by changing config), the document would be set as unmodified, this would result in data loss if the document is closed (because no Prompt to save is shown).

(I discovered this while working on MR !1127 (merged))

Test Plan

  • Open an document
  • Draw a few strokes on the document to fill the undo stack
  • Change the Undo Stack Size (General -> Miscellaneous), this should clear the Undo history docker
  • Close the document, "Document has been modified" prompt should be shown.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports

Loading