Bug 322850

Summary: Image Editing options are applied to the first image, not the selected one
Product: [Applications] gwenview Reporter: Kai Uwe Broulik <kde>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: agateau, myriam
Priority: NOR    
Version: 4.11.0 rc2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 4.11.1

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
index.

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

http://commits.kde.org/kdelibs/14e2ff5b7359d572cd520fd7da3791230ded169a