Fix thumbnail update after undo

Authored by muhlenpfordt on Apr 8 2018, 12:42 PM.

Description

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 Ctrl+R)
  • Undo all edits (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

Details

Committed
muhlenpfordtApr 9 2018, 6:23 AM
Reviewer
Gwenview
Differential Revision
D11715: Fix thumbnail update after undo
Parents
R260:e359ebf19374: Fix thumbnail bar update after editing a viewed image
Branches
Unknown
Tags
Unknown