diff --git a/app/SubWindowHandle.cpp b/app/SubWindowHandle.cpp index 6cae3eb..578155f 100644 --- a/app/SubWindowHandle.cpp +++ b/app/SubWindowHandle.cpp @@ -128,9 +128,9 @@ Bool SubWindowHandle::loadFile( QString cFilename, Bool bForceDialog ) Int InputFormat = -1; if( !m_pCurrStream ) - { - m_pCurrStream = new PlaYUVerStream; - } + { + m_pCurrStream = new PlaYUVerStream; + } m_pCurrStream->getFormat( Width, Height, InputFormat, FrameRate ); diff --git a/app/plaYUVerApp.cpp b/app/plaYUVerApp.cpp index b10b662..565e68a 100644 --- a/app/plaYUVerApp.cpp +++ b/app/plaYUVerApp.cpp @@ -758,27 +758,26 @@ Void plaYUVerApp::seekSliderEvent( Int new_frame_num ) Void plaYUVerApp::lockButtonEvent() { - if( !m_arrayActions[VIDEO_LOCK_ACT]->isChecked() ) + if( m_arrayActions[VIDEO_LOCK_ACT]->isChecked() ) { - if( m_acPlayingSubWindows.contains( m_pcCurrentSubWindow ) ) - { + if( m_acPlayingSubWindows.size() > 1 ) m_acPlayingSubWindows.clear(); - m_acPlayingSubWindows.append( m_pcCurrentSubWindow ); - } - else - { - if( m_acPlayingSubWindows.size() > 1 ) - m_acPlayingSubWindows.clear(); - SubWindowHandle *subWindow; - for( Int i = 0; i < mdiArea->subWindowList().size(); i++ ) + SubWindowHandle *subWindow; + for( Int i = 0; i < mdiArea->subWindowList().size(); i++ ) + { + subWindow = qobject_cast( mdiArea->subWindowList().at( i ) ); + if( !subWindow->getIsModule() ) { - subWindow = qobject_cast( mdiArea->subWindowList().at( i ) ); - if( !subWindow->getIsModule() ) - m_acPlayingSubWindows.append( subWindow ); + m_acPlayingSubWindows.append( subWindow ); + m_pcFrameSlider->setMaximum( qMin( m_pcFrameSlider->maximum(), ( Int )subWindow->getInputStream()->getFrameNum() - 1 ) ); } } } + else + { + stop(); + } updateCurrFrameNum(); updateTotalFrameNum(); }