From 6441f929a5f79005d580daeffe9f8d0cfbd94fac Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Wed, 17 Nov 2010 15:33:09 +0000 Subject: [PATCH] Recommit patch as this wasn't causing the crashes. BUG: 240037 svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1198147 --- src/ViewContainer.cpp | 1 + src/ViewManager.cpp | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/ViewContainer.cpp b/src/ViewContainer.cpp index 58774fbc1..79993edc5 100644 --- a/src/ViewContainer.cpp +++ b/src/ViewContainer.cpp @@ -430,6 +430,7 @@ TabbedViewContainer::TabbedViewContainer(NavigationPosition position , QObject* _tabBar->setDrawBase(true); _tabBar->setDocumentMode(true); _tabBar->setFocusPolicy(Qt::NoFocus); + _tabBar->setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab); _newTabButton = new QToolButton(_containerWidget); _newTabButton->setIcon(KIcon("tab-new")); diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp index d5139a92f..3c5db04af 100644 --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -360,13 +360,8 @@ void ViewManager::sessionFinished() Session* session = qobject_cast(sender()); - if ( _sessionMap[qobject_cast(activeView())] == session ) - { - // switch to the next view before deleting the session views to prevent flicker - // occurring as a result of an interval between removing the active view and switching - // to the next view - nextView(); - } + // We're using setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab) + // so no need to manually select next tab. Q_ASSERT(session);