From ad9f8011c36cf86d79f8e72d027853391c94c101 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Fri, 4 Mar 2011 14:34:19 -0500 Subject: [PATCH] Correct issue where new tabs start in wrong directories. Currently, Konsole only updates the tab folder ~2 seconds. After this patch, when a new tab is requested the working directory is updated. Patch by Christoph Feck. BUG: 227156 FIXED-IN: 4.7 --- src/MainWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 39727fc0c..046c09a2b 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -346,9 +346,19 @@ void MainWindow::sessionListChanged(const QList& actions) QString MainWindow::activeSessionDir() const { if ( _pluggedController ) + { + if ( Session* session = _pluggedController->session() ) + { + // For new tabs to get the correct working directory, + // force the updating of the currentWorkingDirectory. + session->getDynamicTitle(); + } return _pluggedController->currentDir(); + } else + { return QString(); + } } void MainWindow::openUrls(const QList& urls)