Fix close subwindow
This commit is contained in:
1 parent
bece510edd
commit
8e7598c8a6
2 files changed
+11
-11
No files matched your search
@@ -111,12 +111,14 @@ Void PlaYUVerSubWinManager::removeSubWindow( Int windowIdx )
|
|||||||
{
|
{
|
||||||
if( m_bMdiModeEnabled )
|
if( m_bMdiModeEnabled )
|
||||||
{
|
{
|
||||||
m_pcMdiArea->removeSubWindow( m_apcSubWindowList.at( windowIdx ) );
|
PlaYUVerMdiSubWindow* mdiSubWindow = m_apcMdiSubWindowList.at( windowIdx );
|
||||||
m_apcMdiSubWindowList.at( windowIdx )->close();
|
|
||||||
m_apcMdiSubWindowList.removeAt( windowIdx );
|
m_apcMdiSubWindowList.removeAt( windowIdx );
|
||||||
|
m_pcMdiArea->removeSubWindow( m_apcSubWindowList.at( windowIdx ) );
|
||||||
|
mdiSubWindow->close();
|
||||||
}
|
}
|
||||||
m_apcSubWindowList.removeAt( windowIdx );
|
m_apcSubWindowList.removeAt( windowIdx );
|
||||||
}
|
}
|
||||||
|
m_apcSubWindowList.front()->activateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
Void PlaYUVerSubWinManager::removeSubWindow( SubWindowHandle* window )
|
Void PlaYUVerSubWinManager::removeSubWindow( SubWindowHandle* window )
|
||||||
@@ -126,13 +128,7 @@ Void PlaYUVerSubWinManager::removeSubWindow( SubWindowHandle* window )
|
|||||||
|
|
||||||
Void PlaYUVerSubWinManager::removeMdiSubWindow( PlaYUVerMdiSubWindow* window )
|
Void PlaYUVerSubWinManager::removeMdiSubWindow( PlaYUVerMdiSubWindow* window )
|
||||||
{
|
{
|
||||||
Int windowIdx = m_apcMdiSubWindowList.indexOf( window );
|
removeSubWindow( m_apcMdiSubWindowList.indexOf( window ) );
|
||||||
if( windowIdx >= 0 )
|
|
||||||
{
|
|
||||||
|
|
||||||
m_apcMdiSubWindowList.removeAt( windowIdx );
|
|
||||||
m_apcSubWindowList.removeAt( windowIdx );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Void PlaYUVerSubWinManager::removeAllSubWindow()
|
Void PlaYUVerSubWinManager::removeAllSubWindow()
|
||||||
@@ -195,7 +191,7 @@ Void PlaYUVerSubWinManager::setActiveSubWindow( QWidget *window )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
m_pcActiveWindow = qobject_cast<SubWindowHandle *>( window );
|
m_pcActiveWindow = qobject_cast<SubWindowHandle *>( window );
|
||||||
window->font();
|
m_pcActiveWindow->window()->activateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
Void PlaYUVerSubWinManager::tileSubWindows()
|
Void PlaYUVerSubWinManager::tileSubWindows()
|
||||||
|
|||||||
@@ -54,11 +54,15 @@ private:
|
|||||||
|
|
||||||
SubWindowHandle* m_pcActiveWindow;
|
SubWindowHandle* m_pcActiveWindow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal functions
|
||||||
|
*/
|
||||||
|
Void removeSubWindow( Int windowIdx );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PlaYUVerSubWinManager(QWidget *parent = 0);
|
PlaYUVerSubWinManager(QWidget *parent = 0);
|
||||||
|
|
||||||
Void addSubWindow(SubWindowHandle *widget, Qt::WindowFlags flags = 0);
|
Void addSubWindow(SubWindowHandle *widget, Qt::WindowFlags flags = 0);
|
||||||
Void removeSubWindow( Int windowIdx );
|
|
||||||
Void removeSubWindow( SubWindowHandle *window);
|
Void removeSubWindow( SubWindowHandle *window);
|
||||||
|
|
||||||
Void removeAllSubWindow();
|
Void removeAllSubWindow();
|
||||||
|
|||||||
Reference in new issue
Block a user