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)