Commit 2b60e15e authored by tobias's avatar tobias Committed by Jean-Baptiste Kempf
Browse files

Seek only if the position actually changed.


Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent b29a9f0d
...@@ -167,6 +167,7 @@ void SeekSlider::mouseReleaseEvent( QMouseEvent *event ) ...@@ -167,6 +167,7 @@ void SeekSlider::mouseReleaseEvent( QMouseEvent *event )
{ {
event->accept(); event->accept();
b_isSliding = false; b_isSliding = false;
bool b_seekPending = seekLimitTimer->isActive();
seekLimitTimer->stop(); /* We're not sliding anymore: only last seek on release */ seekLimitTimer->stop(); /* We're not sliding anymore: only last seek on release */
if ( b_is_jumping ) if ( b_is_jumping )
{ {
...@@ -174,7 +175,8 @@ void SeekSlider::mouseReleaseEvent( QMouseEvent *event ) ...@@ -174,7 +175,8 @@ void SeekSlider::mouseReleaseEvent( QMouseEvent *event )
return; return;
} }
QSlider::mouseReleaseEvent( event ); QSlider::mouseReleaseEvent( event );
updatePos(); if( b_seekPending )
updatePos();
} }
void SeekSlider::mousePressEvent( QMouseEvent* event ) void SeekSlider::mousePressEvent( QMouseEvent* event )
...@@ -227,6 +229,7 @@ void SeekSlider::mousePressEvent( QMouseEvent* event ) ...@@ -227,6 +229,7 @@ void SeekSlider::mousePressEvent( QMouseEvent* event )
b_isSliding = true ; b_isSliding = true ;
setValue( QStyle::sliderValueFromPosition( MINIMUM, MAXIMUM, event->x(), width(), false ) ); setValue( QStyle::sliderValueFromPosition( MINIMUM, MAXIMUM, event->x(), width(), false ) );
emit sliderMoved( value() );
event->accept(); event->accept();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment