1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

SoundPlayer: Allow playback progress slider jump to cursor

This fix allows us to move the knob wherever we click inside the slider.
The 'jump_to_cursor()' mechanism wasn't working properly because the
player was overwriting the value we had just clicked.
This commit is contained in:
Elyse 2021-11-01 23:49:19 -06:00 committed by Andreas Kling
parent 2462fb5f0e
commit 5c845dbfcb

View file

@ -15,7 +15,7 @@ public:
Function<void(int)> on_knob_released; Function<void(int)> on_knob_released;
void set_value(int value) void set_value(int value)
{ {
if (!knob_dragging()) if (!knob_dragging() && !mouse_is_down())
GUI::Slider::set_value(value); GUI::Slider::set_value(value);
} }