diff --git a/source/app/ModulesHandle.cpp b/source/app/ModulesHandle.cpp index d3ea2be..f73cd87 100644 --- a/source/app/ModulesHandle.cpp +++ b/source/app/ModulesHandle.cpp @@ -106,12 +106,12 @@ SubWindowHandle* ModulesHandle::toggleSelectedModuleIf( SubWindowHandle* pcSubWi } else { - currModuleIf->m_pcSubWindow->disableModule(); + destroyModuleIf( currModuleIf ); } return interfaceChild; } -Void ModulesHandle::destroyModuleIf( PlaYUVerModuleIf* pcCurrModuleIf ) +Void ModulesHandle::destroyModuleIf( PlaYUVerModuleIf *pcCurrModuleIf ) { pcCurrModuleIf->m_pcAction->setChecked( false ); if( pcCurrModuleIf->m_pcDisplaySubWindow ) @@ -119,6 +119,11 @@ Void ModulesHandle::destroyModuleIf( PlaYUVerModuleIf* pcCurrModuleIf ) pcCurrModuleIf->m_pcDisplaySubWindow->close(); pcCurrModuleIf->m_pcDisplaySubWindow = NULL; } + else + { + pcCurrModuleIf->m_pcSubWindow->disableModule(); + } + pcCurrModuleIf->m_pcSubWindow->refreshFrame(); pcCurrModuleIf->m_pcSubWindow = NULL; pcCurrModuleIf->destroy(); } diff --git a/source/app/ModulesHandle.h b/source/app/ModulesHandle.h index 5346952..b656a4f 100644 --- a/source/app/ModulesHandle.h +++ b/source/app/ModulesHandle.h @@ -54,7 +54,7 @@ public: QMenu* createMenus( QMenuBar *MainAppMenuBar ); Void updateMenus( Bool hasSubWindow ); SubWindowHandle* toggleSelectedModuleIf( SubWindowHandle* pcSubWindow ); - static Void destroyModuleIf( PlaYUVerModuleIf* pcCurrModuleIf ); + Void destroyModuleIf( PlaYUVerModuleIf* pcCurrModuleIf ); private: QWidget *m_pcParent; diff --git a/source/app/SubWindowHandle.cpp b/source/app/SubWindowHandle.cpp index 17abf0e..89b8811 100644 --- a/source/app/SubWindowHandle.cpp +++ b/source/app/SubWindowHandle.cpp @@ -126,7 +126,6 @@ Void SubWindowHandle::disableModule() { if( !m_pcCurrentModule ) return; - ModulesHandle::destroyModuleIf( m_pcCurrentModule ); m_pcCurrentModule = NULL; m_pcModuleSubWindow = NULL; refreshFrame();