Mercurial > retraceit
changeset 16:6d5dd3ae2ad3
Save last selection in settings
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 14 Apr 2015 17:25:44 +0200 |
parents | 43a36293f495 |
children | 73efe717b944 |
files | src/mainwindow.cpp |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mainwindow.cpp Tue Apr 14 17:25:30 2015 +0200 +++ b/src/mainwindow.cpp Tue Apr 14 17:25:44 2015 +0200 @@ -130,6 +130,7 @@ void MainWindow::setFolder(const QString& folder) { QFileInfo fi(folder); + mSettings.setValue(SUB_FOLDER_KEY, folder); if (!fi.isDir() || !fi.isReadable()) { showErrorMessage(tr("Failed to access directory: '%1'").arg(folder)); } @@ -162,6 +163,10 @@ void MainWindow::setRootFolder(const QString &folder) { mRootFolder = folder; + QDir dir(folder); + dir.cdUp(); + mSettings.setValue(ROOT_FOLDER_KEY, dir.absolutePath()); + showSubFolderSelect(); }