[vlc-commits] qt4: Work around endlessly bouncing input slider

Hugo Beauzée-Luyssen git at videolan.org
Tue Dec 8 11:01:46 CET 2015


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Dec  8 10:55:10 2015 +0100| [98a4529f15b10f9f52091a8a9fe2fccbcb8f5ca3] | committer: Hugo Beauzée-Luyssen

qt4: Work around endlessly bouncing input slider

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

 modules/gui/qt4/util/input_slider.cpp |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp
index deacbe5..7935982 100644
--- a/modules/gui/qt4/util/input_slider.cpp
+++ b/modules/gui/qt4/util/input_slider.cpp
@@ -58,7 +58,7 @@
 #define FADEOUTDELAY 2000
 
 SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static )
-          : QSlider( q, _parent ), b_classic( _static )
+          : QSlider( q, _parent ), b_classic( _static ), animLoading( NULL )
 {
     isSliding = false;
     isJumping = false;
@@ -199,7 +199,15 @@ void SeekSlider::setPosition( float pos, int64_t time, int length )
         setEnabled( b_seekable );
 
     if( !isSliding )
+    {
         setValue( (int)( pos * 1000.0 ) );
+        if ( animLoading != NULL && pos >= 0.0f && animLoading->state() != QAbstractAnimation::Stopped )
+        {
+            animLoading->stop();
+            mLoading = 0.0f;
+        }
+
+    }
 
     inputLength = length;
 }



More information about the vlc-commits mailing list