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
commit 5c845dbfcb
Notes: sideshowbarker 2024-07-18 01:29:21 +09:00

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);
} }