| Summary: | After cropping a .jpg image and cancelling/denying the crop operation, the preview icon shows the cropped version in the directory browser | ||
|---|---|---|---|
| Product: | [Applications] gwenview | Reporter: | Shlomi Fish <shlomif> |
| Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | myriam, nate |
| Priority: | NOR | ||
| Version First Reported In: | Git (add output of "git log -1 --oneline" to description) | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/gwenview/f78e5e4b05b7e5a04690dceb5e2203b0ef41bf66 | Version Fixed/Implemented In: | 18.04.0 |
| Sentry Crash Report: | |||
| Attachments: | An offending file, but I tested a different image. | ||
|
Description
Shlomi Fish
2015-12-21 12:40:57 UTC
Created attachment 96228 [details]
An offending file, but I tested a different image.
Hi all! I noticed it also happens with scaling an image and with other operations. Here's a proposed patch - I'm not sure it's the best way to fix it - https://git.reviewboard.kde.org/r/126678/ . Can't reproduce in Gwenview 17.11.70 in KDE Neon. I can still reproduce using the provided steps. The browse mode shows the cropped version after undoing the crop. Git commit f78e5e4b05b7e5a04690dceb5e2203b0ef41bf66 by Peter Mühlenpfordt.
Committed on 09/04/2018 at 06:23.
Pushed by muhlenpfordt into branch 'Applications/18.04'.
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
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
M +9 -0 lib/abstractimageoperation.cpp
M +2 -0 lib/abstractimageoperation.h
M +1 -0 lib/crop/cropimageoperation.cpp
M +1 -2 lib/document/document.cpp
M +2 -1 lib/document/document.h
M +1 -0 lib/redeyereduction/redeyereductionimageoperation.cpp
M +1 -0 lib/resize/resizeimageoperation.cpp
M +1 -1 lib/thumbnailview/thumbnailview.cpp
M +4 -1 lib/transformimageoperation.cpp
M +2 -0 tests/auto/documenttest.cpp
https://commits.kde.org/gwenview/f78e5e4b05b7e5a04690dceb5e2203b0ef41bf66
|