Bug 388805

Summary: Remove wallpaper from list selects next wallpaper but does not apply it
Product: [Plasma] plasmashell Reporter: Gregor Mi <codestruct>
Component: Image & Slideshow wallpaper pluginsAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: kde, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.11.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Gregor Mi 2018-01-11 13:59:34 UTC
CURRENT:
1. Add some wallpapers to the list (e.g. via DND)
2. Select the first one and click Apply. => The image is set as wallpaper.
3. Remove the first image using the remove button (top-right corner of the image) => The next image is selected automatically (but not really). => The Apply button is disabled. Click OK and the wallpaper does not change.

EXPECTED:
- The Apply button gets enabled.
- The wallpaper changes to the second image (which looks selected) when OK is clicked.

WORKAROUND:
You have to click the second image via mouse to enable the Apply button.
Comment 1 Kai Uwe Broulik 2018-01-11 14:22:53 UTC
It just changes the currentIndex but doesn't update cfg_Image
Comment 2 Kai Uwe Broulik 2018-01-11 14:35:45 UTC
Git commit 3b4be6568579967934937ae3393a8e5c54b8de3c by Kai Uwe Broulik.
Committed on 11/01/2018 at 14:35.
Pushed by broulik into branch 'master'.

[Wallpaper Image Configuration] Set cfg_Image whenever delegate becomes current

The delete button changes the currentIndex to something else when deleting the current image but that didn't update cfg_Image.
Just listen to when we become current. Might also fix keyboard navigation (didn't test if that worked before but it certainly does now).

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

M  +5    -1    wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml

https://commits.kde.org/plasma-workspace/3b4be6568579967934937ae3393a8e5c54b8de3c