From 4757621b22d86b15d26983ff896ad21a0941c2d7 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 13 Sep 2009 03:57:58 +0200 Subject: Fixing session manager behaviour following a bit dolphin's code --- src/application.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/application.cpp') diff --git a/src/application.cpp b/src/application.cpp index 1e30cfd0..88eb3c58 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -84,11 +84,6 @@ Application::~Application() int Application::newInstance() { - if( isSessionRestored() && sessionManager()->restoreSession() ) - { - return 1; - } - KCmdLineArgs::setCwd(QDir::currentPath().toUtf8()); KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); @@ -120,9 +115,12 @@ int Application::newInstance() } else { - // creating new window - MainWindow *w = newMainWindow(); - w->slotHome(); + if(!sessionRestored()) + { + // creating new window + MainWindow *w = newMainWindow(); + w->slotHome(); + } } return 0; -- cgit v1.2.1