From 801adb3057d09fda00b0f9ebbb8df19136e63390 Mon Sep 17 00:00:00 2001 From: tetektoza Date: Wed, 25 Oct 2023 19:23:16 +0200 Subject: [PATCH] Config: Open in home directory if app is being run for the 1st time Previously, if user didn't have config files (which is (most of the times) equivalent to running the app for the first time), then by default next file that he wanted to open would be opened in the config directory. This oneliner changes it, opening it in home directory by default. --- source/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/config.cpp b/source/config.cpp index d18ae524..afd1cd64 100644 --- a/source/config.cpp +++ b/source/config.cpp @@ -41,7 +41,7 @@ void Config::loadConfiguration() } if (!theConfig.contains("LastFilePath")) { - theConfig.insert("LastFilePath", jsonFilePath); + theConfig.insert("LastFilePath", QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/"); configurationModified = true; } if (!theConfig.contains("PaletteDefaultColor")) {