Bug 427869 - "Highlight changed settings" button doesn't correctly switch states when clicked fast
Summary: "Highlight changed settings" button doesn't correctly switch states when clic...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: sidebarview (show other bugs)
Version: 5.20.0
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-17 14:48 UTC by Nikhil Prabhu
Modified: 2020-10-29 15:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.20.3


Attachments
Preview of bug (95.44 KB, image/png)
2020-10-17 14:48 UTC, Nikhil Prabhu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikhil Prabhu 2020-10-17 14:48:10 UTC
Created attachment 132476 [details]
Preview of bug

SUMMARY

Clicking fast on the "Highlight changed settings" button doesn't work properly. For example, try double-clicking or clicking a little fast (2 clicks per second) on the button and what happens basically is that the setting doesn't get detected (the option doesn't change state, but the button visually becomes enabled/disabled). It doesn't even have to be really fast continuous clicks; just two clicks within a second triggers it. This is seen in the attached image (the button is visually enabled, but changed settings aren't highlighted).

STEPS TO REPRODUCE
1. Open System Settings
2. Keep clicking a little fast on the "Highlight changed settings" button a few times.

OBSERVED RESULT
The setting sometimes doesn't toggle properly (the button becomes visually enabled/disabled, but the actual state of the option doesn't actually change).

EXPECTED RESULT
The option's state should properly change with each click of the button.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20201014
KDE Plasma Version: 5.20.0
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Kernel Version: 5.8.14-1-default
OS Type: 64-bit
Processors: 8 × AMD Ryzen 5 3400G with Radeon Vega Graphics
Memory: 13.6 GiB of RAM
Graphics Processor: AMD RAVEN

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2020-10-17 15:27:01 UTC
Can confirm.
Comment 2 Claudius Ellsel 2020-10-17 15:29:45 UTC
I couldn't reproduce at least on Wayland. I tried about five times and double clicking as fast as I could. The result for me always was that the setting got enabled and then disabled again.

Do I have to click fast more often then twice? Like three or four times?

Have you tried this on Wayland? I also thought maybe you have weaker hardware, but looking at it that is not the case. Are you sure that the click events get recognized when the state doesn't change?
Comment 3 Claudius Ellsel 2020-10-17 15:32:10 UTC
I can also confirm now. Probably I didn't take much attention to what actually should happen when double clicking and thought everything worked fine, sorry about that.

One thought is that this might be actually a feature to prevent accidental double clicks?
Comment 4 Nate Graham 2020-10-17 15:34:42 UTC
It's not an intentional feature.
Comment 5 Nate Graham 2020-10-29 15:05:01 UTC
Git commit cee4ba93c659aa7e5bc62cac5a1ca959fcc5241c by Nate Graham, on behalf of Benjamin Port.
Committed on 29/10/2020 at 15:04.
Pushed by ngraham into branch 'Plasma/5.20'.

Fix highlight settings tool button use onToggled to prevent bad state
(cherry picked from commit 8b0caf4e55fd41b56d90edb936ae5f9ee8225f65)

M  +1    -1    sidebar/package/contents/ui/CategoriesPage.qml
M  +1    -1    sidebar/package/contents/ui/SubCategoryPage.qml

https://invent.kde.org/plasma/systemsettings/commit/cee4ba93c659aa7e5bc62cac5a1ca959fcc5241c