Bug 322850 - Image Editing options are applied to the first image, not the selected one
Summary: Image Editing options are applied to the first image, not the selected one
Alias: None
Product: gwenview
Classification: Unclassified
Component: general (show other bugs)
Version: 4.11.0 rc2
Platform: Other Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Gwenview Bugs
Depends on:
Reported: 2013-07-26 16:57 UTC by Kai Uwe Broulik
Modified: 2013-08-17 19:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.1


Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2013-07-26 16:57:19 UTC
When having multiple images open at the same time, using one of the Edit options (such as Mirror) affect the first icon in the view (ie. the top left one), not the selected (ie. blue highlighted) image.

Reproducible: Always

Steps to Reproduce:
1. Have multiple images open at the same time
2. Click on not the first image so it gets highlighted
3. Use Edit → Flip horizontally
Actual Results:  
Image in the top left is mirrored

Expected Results:  
Selected image is mirrored
Comment 1 Aurelien Gateau 2013-08-05 08:43:31 UTC
Can reproduce. The code is probably using the first element of the selection instead of currentIndex().
Comment 2 Aurelien Gateau 2013-08-08 20:16:23 UTC
Can you try https://git.reviewboard.kde.org/r/111953/ and confirm it fixes the bug?
Comment 3 Aurelien Gateau 2013-08-17 19:45:17 UTC
Git commit 14e2ff5b7359d572cd520fd7da3791230ded169a by Aurélien Gâteau.
Committed on 08/08/2013 at 19:59.
Pushed by gateau into branch 'KDE/4.11'.

KLinkItemSelectionModel: Synchronize currentIndex

In addition to synchronizing selection, also synchronize the current

This fixes a bug in Gwenview where image operations are not applied to
the correct images when multiple images are selected.
FIXED-IN: 4.11.1
REVIEW: 111953

M  +17   -0    kdeui/itemviews/klinkitemselectionmodel.cpp
M  +2    -0    kdeui/itemviews/klinkitemselectionmodel.h
M  +53   -14   kdeui/tests/klinkitemselectionmodeltest.cpp
M  +16   -0    kdeui/tests/klinkitemselectionmodeltest.h