From dc1144cc7fb633c7fff3377056607be5f4ec02c1 Mon Sep 17 00:00:00 2001 From: Jekyll Wu Date: Mon, 16 Apr 2012 03:39:56 +0800 Subject: [PATCH] Revert "Less explict call of session->run()" Unfortunately, that commit makes all tabs in the restored Konsole window show fallback tab until you switch to it. Cleearly, the way when and how to start a session is messy. Note: reverting does means calling session->run() explicitly is the OK way. This reverts commit c6bb999066e9e804c85019c97cdabcef73a23a82. --- src/ViewManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp index c15a0937d..6434a662b 100644 --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -917,6 +917,8 @@ void ViewManager::restoreSessions(const KConfigGroup& group) foreach(int id, ids) { Session* session = SessionManager::instance()->idToSession(id); createView(session); + if (!session->isRunning()) + session->run(); if (tab++ == activeTab) display = qobject_cast(activeView()); } @@ -930,6 +932,8 @@ void ViewManager::restoreSessions(const KConfigGroup& group) Profile::Ptr profile = ProfileManager::instance()->defaultProfile(); Session* session = SessionManager::instance()->createSession(profile); createView(session); + if (!session->isRunning()) + session->run(); } } @@ -958,6 +962,7 @@ int ViewManager::newSession() Session* session = SessionManager::instance()->createSession(profile); this->createView(session); + session->run(); return session->sessionId(); } @@ -980,6 +985,7 @@ int ViewManager::newSession(QString profile, QString directory) session->setInitialWorkingDirectory(directory); this->createView(session); + session->run(); return session->sessionId(); }