Skip to content
Commit f78e5e4b authored by Peter Mühlenpfordt's avatar Peter Mühlenpfordt
Browse files

Fix thumbnail update after undo

Summary:
After editing an image multiple times (e.g. rotate) and then undoing,
the thumbnail displays a previous edit state between the undos.
This is caused by connecting to `QUndoStack` signal `indexChanged`
which emits before some undo operations are finished and the new
thumbnail is created too early.
This patch emits the `modified`/`saved` signals for a document only
after the undo image operation is finished. It also solves the problem
displaying a wrong thumbnail in another mode after undoing all edits.

Depends on D11714
BUG: 356998
FIXED-IN: 18.04.0

Test Plan:
* Open image in Gwenview (View or Browse Mode)
* Edit image at least 3 times (e.g. rotate with {key Ctrl R})
* Undo all edits ({key Ctrl Z})
* Thumbnail should always correspond to undo step
* Thumbnail should be identical in View, Browse and Fullscreen Mode

Reviewers: #gwenview, rkflx

Reviewed By: #gwenview, rkflx

Subscribers: rkflx, huoni

Differential Revision: https://phabricator.kde.org/D11715
parent e359ebf1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment