[vlc-commits] qt: don't display position in progress bar if media is not seekable
Pierre Lamot
git at videolan.org
Fri Jan 26 17:30:37 CET 2018
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Jan 26 17:00:40 2018 +0100| [a49074832c5a65b707d3af4b3f2460f378bea335] | committer: Jean-Baptiste Kempf
qt: don't display position in progress bar if media is not seekable
Ref #19235
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a49074832c5a65b707d3af4b3f2460f378bea335
---
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 )
{
More information about the vlc-commits
mailing list