[vlc-commits] Make 1.0x speed accessible from the slider

Romain Vimont git at videolan.org
Mon Apr 9 17:51:23 CEST 2018


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Mon Apr  9 09:14:24 2018 +0200| [6598b2c4d84d6344b413d0cb14563a0a6335956c] | committer: Hugo Beauzée-Luyssen

Make 1.0x speed accessible from the slider

A slider value change is ignored if the new value is the same as the
last one.

However, the last value was not updated on manual slider move, so its
value remained 0 (speed 2^0 == 1). As a consequence, any slider "move
to 1.0x" event was ignored.

Update the last value on slider move to fix the problem.

Fixes #20170

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6598b2c4d84d6344b413d0cb14563a0a6335956c
---

 modules/gui/qt/components/interface_widgets.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
index 5ce20a28e0..b9bf121dcb 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -785,6 +785,7 @@ void SpeedControlWidget::updateRate( int sliderValue )
 {
     if( sliderValue == lastValue )
         return;
+    lastValue = sliderValue;
 
     double speed = pow( 2, (double)sliderValue / 17 );
     int rate = INPUT_RATE_DEFAULT / speed;



More information about the vlc-commits mailing list