Bug 394406

Summary: "Plus" contextual button doesn't update to "minus" when clicking a picture in browse mode.
Product: [Applications] gwenview Reporter: Alban Boissard <albanboissard>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Severity: normal CC: devel, null
Priority: NOR    
Version: 17.12.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 18.04.2
Attachments: Wrong "plus" button screenshot

Description Alban Boissard 2018-05-18 11:11:08 UTC
Created attachment 112728 [details]
Wrong "plus" button screenshot

When selecting a picture in browse mode by clicking on it, the contextual button "+" doesn't change to "-". (See screenshot)

- If I click this "+" button, the picture is unselected.

- If I move the cursor outside the picture then inside, the correct button is visible.

Reproducible: Always

Steps to Reproduce:
1. Open a folder in browse mode.
2. Click on a picture.

Actual Results:
The picture is selected but the "+/-" button stay on "+", but behave (correctly) as a "-".

Expected Results:  
The picture is selected and "+/-" button switchs to "-"

PS : I apologize for my bad English, I am french.
Comment 1 null 2018-05-18 22:58:12 UTC
Thanks for the report. I found two ways to reproduce:
- Set mouse behaviour to "double-click" in Systemsettings.
- Hold Ctrl key while clicking.
Comment 2 Peter Mühlenpfordt 2018-05-20 11:35:18 UTC
This also happens in thumbnail bar of View Mode.
Comment 3 Peter Mühlenpfordt 2018-05-25 07:21:36 UTC
Git commit 5d3d973593c7cae19110952ba2944365a1bab623 by Peter Mühlenpfordt.
Committed on 25/05/2018 at 07:19.
Pushed by muhlenpfordt into branch 'Applications/18.04'.

Update thumbnail de-/select hover button on selection change

The de-/select (`-`/`+`) hover button of the thumbnails in Browse
Mode or thumbnail bar in View Mode does not reflect the actual
selection state sometimes.
This patch updates the button state when the selection changed.
FIXED-IN: 18.04.2

Test Plan:
# Open Gwenview in Browse Mode or View Mode with visible thumbnail bar
# Use e.g. {key Ctrl Click} to de-/select images or
  move selection by keyboard
# `-`/`+` button of item under mouse pointer should
  reflect the actual selection state

Reviewers: #gwenview, huoni

Reviewed By: #gwenview, huoni

Subscribers: rkflx

Differential Revision: https://phabricator.kde.org/D13010

M  +3    -1    lib/thumbnailview/previewitemdelegate.cpp
M  +5    -2    lib/thumbnailview/thumbnailbarview.cpp