aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bench/main.cpp2
-rw-r--r--src/bench/mainwindow.cpp6
-rw-r--r--src/bench/mainwindow.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/bench/main.cpp b/src/bench/main.cpp
index 108946f..395d48b 100644
--- a/src/bench/main.cpp
+++ b/src/bench/main.cpp
@@ -383,7 +383,7 @@ void MasterApplication::listenForArguments()
void MasterApplication::applyOptions(const Options &options)
{
if (!options.workspace().isEmpty())
- m_window->setWorkspace(QDir(options.workspace()).absolutePath());
+ m_window->setWorkspace(QDir(options.workspace()).absolutePath(), false);
if (!options.pluginPath().isEmpty()) {
if (!m_window->isInitialized())
diff --git a/src/bench/mainwindow.cpp b/src/bench/mainwindow.cpp
index 567e215..6e3c17b 100644
--- a/src/bench/mainwindow.cpp
+++ b/src/bench/mainwindow.cpp
@@ -216,7 +216,7 @@ void MainWindow::init()
restoreGeometry(s.value("geometry").toByteArray());
//Only set the workspace if we didn't already set it by command line
if (m_workspacePath.isEmpty()) {
- setWorkspace(s.value("workspace", QDir::currentPath()).toString());
+ setWorkspace(s.value("workspace", QDir::currentPath()).toString(), false);
}
if (s.value("http_proxy/enabled").toBool()) {
@@ -338,13 +338,15 @@ void MainWindow::slowDownAnimations(bool enable)
}
-void MainWindow::setWorkspace(const QString& path)
+void MainWindow::setWorkspace(const QString& path, bool activateRootPath)
{
m_workspacePath = path;
m_workspace->setRootPath(path);
m_node->setWorkspace(path);
m_hub->setWorkspace(path);
m_allHosts->setWorkspace(path);
+ if (activateRootPath)
+ m_workspace->activateRootPath();
updateRecentFolder(path);
}
diff --git a/src/bench/mainwindow.h b/src/bench/mainwindow.h
index f410121..87e65a8 100644
--- a/src/bench/mainwindow.h
+++ b/src/bench/mainwindow.h
@@ -58,7 +58,7 @@ public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void activateDocument(const QString path);
- void setWorkspace(const QString& path);
+ void setWorkspace(const QString& path, bool activateRootPath = true);
void setPluginPath(const QString& path);
void setImportPaths(const QStringList& pathList);
void setStaysOnTop(bool enabled);