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 c6bb999066.
This commit is contained in:
Jekyll Wu
2012-04-16 03:39:56 +08:00
parent 95eeff659f
commit dc1144cc7f

View File

@@ -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<TerminalDisplay*>(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();
}