From fb18de9ffae5e7707012f2d4fa3e5f7490cf1476 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Mon, 2 Feb 2015 16:49:44 +0000 Subject: [PATCH] Check about modules disabling before refresh info --- app/VideoSubWindow.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index f464802..b469693 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -332,6 +332,7 @@ Void VideoSubWindow::enableModule( PlaYUVerAppModuleIf* pcModule, Bool bThisWind Void VideoSubWindow::disableModule( PlaYUVerAppModuleIf* pcModule ) { + Bool bRefresh = false; if( pcModule ) { Int modIdx = m_apcCurrentModule.indexOf( pcModule ); @@ -340,6 +341,7 @@ Void VideoSubWindow::disableModule( PlaYUVerAppModuleIf* pcModule ) m_apcCurrentModule.removeAt( modIdx ); } ModulesHandle::destroyModuleIf( pcModule ); + bRefresh |= true; } else { @@ -348,6 +350,7 @@ Void VideoSubWindow::disableModule( PlaYUVerAppModuleIf* pcModule ) { m_apcCurrentModule.removeOne( apcCurrentModule.at( i ) ); ModulesHandle::destroyModuleIf( apcCurrentModule.at( i ) ); + bRefresh |= true; } assert( m_apcCurrentModule.size() == 0 ); if( m_pcCurrentDisplayModule ) @@ -355,10 +358,14 @@ Void VideoSubWindow::disableModule( PlaYUVerAppModuleIf* pcModule ) pcModule = m_pcCurrentDisplayModule; m_pcCurrentDisplayModule = 0; ModulesHandle::destroyModuleIf( m_pcCurrentDisplayModule ); + bRefresh |= true; } } - updateVideoWindowInfo(); - refreshFrame(); + if( bRefresh ) + { + updateVideoWindowInfo(); + refreshFrame(); + } } Void VideoSubWindow::associateModule( PlaYUVerAppModuleIf* pcModule )