From bf7099a2b35d95ad18bc0f6fec44a5acbc5bd742 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Tue, 24 Mar 2015 19:03:09 +0000 Subject: [PATCH] Fix frame slider - max value must be set first --- app/VideoHandle.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/VideoHandle.cpp b/app/VideoHandle.cpp index 759dafb..0ae2ea5 100644 --- a/app/VideoHandle.cpp +++ b/app/VideoHandle.cpp @@ -232,19 +232,19 @@ Void VideoHandle::update() total_frame_num = getMaxFrameNumber(); resolution.append( QString( "@%1" ).arg( pcStream->getFrameRate() ) ); } - else - { - m_pcFrameNumInfo->setCurrFrameNum( 0 ); - } if( pcFrame ) + { m_pcResolutionLabel->setText( resolution ); + } m_pcFramePropertiesSideBar->setData( pcFrame, m_pcCurrentVideoSubWindow->isPlaying() ); - m_pcFrameSlider->setValue( frame_num ); - m_pcFrameSlider->setMaximum( total_frame_num - 1 ); m_pcFrameNumInfo->setTotalFrameNum( total_frame_num ); + m_pcFrameSlider->setMaximum( total_frame_num - 1 ); + + m_pcFrameNumInfo->setCurrFrameNum( frame_num ); + m_pcFrameSlider->setValue( frame_num ); if( m_pcCurrentVideoSubWindow->isPlaying() ) m_arrayActions[PLAY_ACT]->setIcon( style()->standardIcon( QStyle::SP_MediaPause ) );