[vlc-devel] [PATCH 1/2] qt: don't display position in progress bar if media is not seekable
Pierre Lamot
pierre at videolabs.io
Fri Jan 26 17:00:40 CET 2018
---
modules/gui/qt/util/input_slider.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/util/input_slider.cpp b/modules/gui/qt/util/input_slider.cpp
index 741eb26c1a..f76a784617 100644
--- a/modules/gui/qt/util/input_slider.cpp
+++ b/modules/gui/qt/util/input_slider.cpp
@@ -201,14 +201,16 @@ void SeekSlider::setChapters( SeekPoints *chapters_ )
void SeekSlider::setPosition( float pos, int64_t time, int length )
{
VLC_UNUSED(time);
- if( pos == -1.0 )
+ if( pos == -1.0 || ! b_seekable )
{
setEnabled( false );
mTimeTooltip->hide();
isSliding = false;
+ setValue( 0 );
+ return;
}
else
- setEnabled( b_seekable );
+ setEnabled( true );
if( !isSliding )
{
--
2.14.1
More information about the vlc-devel
mailing list