Commit 2cc01837 authored by Robert Knight's avatar Robert Knight

When a session closes, switch to the previous view before deleting the...

When a session closes, switch to the previous view before deleting the session's displays.  This (in most cases) prevents the 'flash' which occurs as one view disappears but before Konsole has switched to the next view.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=661608
parent 50e86f8f
......@@ -222,6 +222,8 @@ void ViewManager::detachActiveView()
void ViewManager::sessionFinished( Session* session )
{
previousView();
QList<TerminalDisplay*> children = _viewSplitter->findChildren<TerminalDisplay*>();
foreach ( TerminalDisplay* view , children )
......@@ -229,11 +231,9 @@ void ViewManager::sessionFinished( Session* session )
if ( _sessionMap[view] == session )
{
_sessionMap.remove(view);
delete view;
view->deleteLater();
}
}
focusActiveView();
}
void ViewManager::focusActiveView()
......@@ -435,12 +435,7 @@ void ViewManager::viewCloseRequest(QWidget* view)
if ( session->views().count() == 0 )
session->closeSession();
}
else
{
kDebug() << __FILE__ << __LINE__ << ": received close request from unknown view." << endl;
}
qDebug() << "Closing view";
focusActiveView();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment