Improve modules destroy when using new window

This commit is contained in:
2014-05-10 04:09:10 +01:00
parent e498e20c3e
commit 73ed8720b5
4 changed files with 45 additions and 43 deletions
+4 -7
View File
@@ -99,6 +99,7 @@ SubWindowHandle* ModulesHandle::toggleSelectedModuleIf()
connect( interfaceChild->getViewArea(), SIGNAL( positionChanged(const QPoint &, PlaYUVerFrame *) ), this,
SLOT( updatePixelValueStatusBar(const QPoint &, PlaYUVerFrame *) ) );
currModuleIf->m_pcDisplaySubWindow = interfaceChild;
currModuleIf->m_pcDisplaySubWindow->setModule( currModuleIf );
}
else
{
@@ -117,15 +118,11 @@ Void ModulesHandle::destroyModuleIf( PlaYUVerModuleIf *pcCurrModuleIf )
{
pcCurrModuleIf->m_pcAction->setChecked( false );
if( pcCurrModuleIf->m_pcDisplaySubWindow )
{
pcCurrModuleIf->m_pcDisplaySubWindow->close();
pcCurrModuleIf->m_pcDisplaySubWindow = NULL;
}
else
{
if( pcCurrModuleIf->m_pcSubWindow )
pcCurrModuleIf->m_pcSubWindow->disableModule();
}
pcCurrModuleIf->m_pcSubWindow->refreshFrame();
pcCurrModuleIf->m_pcDisplaySubWindow = NULL;
pcCurrModuleIf->m_pcSubWindow = NULL;
pcCurrModuleIf->destroy();
}