summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Hindenburg <kurt.hindenburg@gmail.com>2011-03-04 19:34:19 (GMT)
committerKurt Hindenburg <kurt.hindenburg@gmail.com>2011-04-10 20:20:12 (GMT)
commitedec4bedbc9a3ed49d79ac31a5c3d425a47dc47b (patch)
treea83913e85a47e073382d53c01f840871a48791ae
parent05367a7e7463435e7b0a50827875f6dd6ee1940c (diff)
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. I don't see any reason this can't go in 4.6.x CCBUG: 227156 FIXED-IN: 4.7 (cherry picked from commit ad9f8011c36cf86d79f8e72d027853391c94c101)
-rw-r--r--src/MainWindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 39727fc..046c09a 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -346,9 +346,19 @@ void MainWindow::sessionListChanged(const QList<QAction*>& 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<KUrl>& urls)