From 35f1f34966cc419c36c1b7abafc68c493c0c374f Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Sun, 1 Jun 2014 18:05:49 +0100 Subject: [PATCH] Minor bugfix in the seek slider and format button --- source/app/ModulesHandle.cpp | 1 - source/app/SubWindowHandle.cpp | 8 ++++---- source/app/SubWindowHandle.h | 2 +- source/app/plaYUVerApp.cpp | 7 ++++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/app/ModulesHandle.cpp b/source/app/ModulesHandle.cpp index ce1f8af..1303890 100644 --- a/source/app/ModulesHandle.cpp +++ b/source/app/ModulesHandle.cpp @@ -172,7 +172,6 @@ Void ModulesHandle::destroyModuleIf( PlaYUVerModuleIf *pcCurrModuleIf ) pcCurrModuleIf->m_pcSubWindow[i] = NULL; } } - pcCurrModuleIf->destroy(); } diff --git a/source/app/SubWindowHandle.cpp b/source/app/SubWindowHandle.cpp index 032d015..540488c 100644 --- a/source/app/SubWindowHandle.cpp +++ b/source/app/SubWindowHandle.cpp @@ -71,7 +71,7 @@ SubWindowHandle::~SubWindowHandle() delete m_pCurrStream; } -Bool SubWindowHandle::loadFile( const QString &fileName ) +Bool SubWindowHandle::loadFile( const QString &rcFilename, Bool bForceDialog ) { UInt Width = 0, Height = 0, FrameRate = 30; Int InputFormat = -1; @@ -83,7 +83,7 @@ Bool SubWindowHandle::loadFile( const QString &fileName ) m_pCurrStream->getFormat( Width, Height, InputFormat, FrameRate ); - if( m_pCurrStream->guessFormat( fileName, Width, Height, InputFormat, FrameRate ) ) + if( m_pCurrStream->guessFormat( rcFilename, Width, Height, InputFormat, FrameRate ) || bForceDialog ) { ConfigureFormatDialog formatDialog( this ); if( formatDialog.runConfigureFormatDialog( Width, Height, InputFormat, FrameRate ) == QDialog::Rejected ) @@ -93,7 +93,7 @@ Bool SubWindowHandle::loadFile( const QString &fileName ) } QApplication::setOverrideCursor( Qt::WaitCursor ); QApplication::restoreOverrideCursor(); - if( !m_pCurrStream->open( fileName, Width, Height, InputFormat, FrameRate ) ) + if( !m_pCurrStream->open( rcFilename, Width, Height, InputFormat, FrameRate ) ) { return false; } @@ -104,7 +104,7 @@ Bool SubWindowHandle::loadFile( const QString &fileName ) refreshFrame(); - m_cCurrFileName = fileName; + m_cCurrFileName = rcFilename; m_cWindowName = m_pCurrStream->getStreamInformationString(); setWindowTitle( m_cWindowName ); return true; diff --git a/source/app/SubWindowHandle.h b/source/app/SubWindowHandle.h index 93b2fa5..24d0e57 100644 --- a/source/app/SubWindowHandle.h +++ b/source/app/SubWindowHandle.h @@ -65,7 +65,7 @@ public: ~SubWindowHandle(); Bool mayClose(); - Bool loadFile( const QString &fileName ); + Bool loadFile( const QString &rcFilename, Bool bForceDialog = false ); Bool save(); Void play(); diff --git a/source/app/plaYUVerApp.cpp b/source/app/plaYUVerApp.cpp index d6c7e29..1e18254 100644 --- a/source/app/plaYUVerApp.cpp +++ b/source/app/plaYUVerApp.cpp @@ -213,7 +213,7 @@ Void plaYUVerApp::save() Void plaYUVerApp::format() { if( m_pcCurrentSubWindow ) - m_pcCurrentSubWindow->loadFile( m_pcCurrentSubWindow->currentFile() ); + m_pcCurrentSubWindow->loadFile( m_pcCurrentSubWindow->currentFile(), true ); } Void plaYUVerApp::closeActiveWindow() @@ -460,6 +460,7 @@ Void plaYUVerApp::playEvent() break; case -3: m_acPlayingSubWindows.at( i )->close(); + m_acPlayingSubWindows.remove( i ); break; case -4: m_acPlayingSubWindows.remove( i ); @@ -496,7 +497,7 @@ Void plaYUVerApp::updateTotalFrameNum( UInt total_frame_num ) m_pcTotalFrameNumLabel->setText( QString( tr( "%1" ) ).arg( total_frame_num ) ); } -Void plaYUVerApp::seekEvent( int direction ) +Void plaYUVerApp::seekEvent( Int direction ) { if( m_pcCurrentSubWindow ) { @@ -516,7 +517,7 @@ Void plaYUVerApp::seekEvent( int direction ) } } -Void plaYUVerApp::seekSliderEvent( int new_frame_num ) +Void plaYUVerApp::seekSliderEvent( Int new_frame_num ) { if( m_pcCurrentSubWindow ) {