Commit 2b60e15e authored by Tobias Güntner's avatar Tobias Güntner Committed by Jean-Baptiste Kempf

Seek only if the position actually changed.

Signed-off-by: default 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,6 +175,7 @@ void SeekSlider::mouseReleaseEvent( QMouseEvent *event ) ...@@ -174,6 +175,7 @@ void SeekSlider::mouseReleaseEvent( QMouseEvent *event )
return; return;
} }
QSlider::mouseReleaseEvent( event ); QSlider::mouseReleaseEvent( event );
if( b_seekPending )
updatePos(); updatePos();
} }
...@@ -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