Bug 418102

Summary: If I try to close system settings immediately after install/update a color scheme, it prompts to save/discard change
Product: [Applications] systemsettings Reporter: Patrick Silva <bugseforuns>
Component: kcm_colorsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: akselmo, cyril.rossi, jpwhiting, kde, mwoehlke.floss, nate
Priority: NOR    
Version First Reported In: 5.27.80   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.2.0
Sentry Crash Report:

Description Patrick Silva 2020-02-23 17:01:55 UTC
STEPS TO REPRODUCE
1. open system settings > colors
2. click on "Get new color schemes..." button 
3. insall any color scheme and close the window
4. try to close system settings

OBSERVED RESULT
system settings prompts to save/discard change

EXPECTED RESULT
system settings should not prompt to save/discard change because nothing was changed.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.1
Comment 1 Kai Uwe Broulik 2020-02-24 08:33:04 UTC
It was supposed to automatically select the color scheme you installed but that seems broken...
Comment 2 Cyril Rossi 2020-02-24 15:34:03 UTC
(In reply to Kai Uwe Broulik from comment #1)
> It was supposed to automatically select the color scheme you installed but
> that seems broken...

Yes, it automatically selects the newly installed color scheme but it doesn't apply it. You need to apply or discard change in order to close the system settings.
Comment 3 Patrick Silva 2020-10-16 12:49:18 UTC
System Settings also prompts to save/discard changes on close after I update a color scheme
via "Get new color schemes..." window.

Operating System: Arch Linux
KDE Plasma Version: 5.20.0
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Comment 4 Cyril Rossi 2020-10-28 14:12:06 UTC
(In reply to Patrick Silva from comment #3)
> System Settings also prompts to save/discard changes on close after I update
> a color scheme
> via "Get new color schemes..." window.

Same as comments above

It automatically selects the color scheme newly installed or updated, which means the KCM has some changes to apply or discard.
Comment 5 Patrick Silva 2021-05-16 17:15:20 UTC
Fixed on Arch Linux (Plasma 5.22 beta) and neon unstable. :)
Comment 6 Patrick Silva 2021-08-07 11:51:54 UTC
it's reproducible again

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.3
Graphics Platform: X11
Comment 7 Akseli Lahtinen 2024-09-17 10:09:38 UTC
Seems what happens is when you download a new colorscheme, its being set active so you can just click apply to enable it. Since it being active is seen as a change, and you close the window, it wants to make sure if you actually wanted to apply the changes.

Not really a bug, works as intended.
Comment 8 Patrick Silva 2024-09-17 11:09:52 UTC
The current behavior is inconsistent with other KCMs.
Comment 9 Bug Janitor Service 2024-09-17 16:07:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4711
Comment 10 David Edmundson 2024-09-17 18:30:34 UTC
Git commit 2e27e70cce0865c3f25d6490887016f3764a8971 by David Edmundson.
Committed on 17/09/2024 at 17:45.
Pushed by davidedmundson into branch 'master'.

kcms/colors: Don't auto-select newly installed entry

This is inconsistent with other KCMs. It is redundant as KNS has a "use" button
within it's own dialog.

As we reload the model which may displace the active entry, we need to manually
re-select it.

M  +3    -24   kcms/colors/colors.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/2e27e70cce0865c3f25d6490887016f3764a8971
Comment 11 David Edmundson 2024-09-17 21:29:53 UTC
Git commit 0fc38934762089b81b6570fbc9c7db3aa2953c9d by David Edmundson, on behalf of David Edmundson.
Committed on 17/09/2024 at 21:14.
Pushed by davidedmundson into branch 'Plasma/6.2'.

kcms/colors: Don't auto-select newly installed entry

This is inconsistent with other KCMs. It is redundant as KNS has a "use" button
within it's own dialog.

As we reload the model which may displace the active entry, we need to manually
re-select it.


(cherry picked from commit 2e27e70cce0865c3f25d6490887016f3764a8971)

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>

M  +3    -24   kcms/colors/colors.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/0fc38934762089b81b6570fbc9c7db3aa2953c9d