From ee96080540ae02fb6c16d393a86781b3a871bb15 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 20 Sep 2021 15:43:04 +0200 Subject: [PATCH] Only return the path if the folder actually exist It seems that the dialog is acting up if the last known folder doesn't exist anymore (usually when a network drive was unmounted). --- cura/CuraApplication.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 08861af7c4..553de22f8f 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -750,7 +750,9 @@ class CuraApplication(QtApplication): @pyqtSlot(str, result = QUrl) def getDefaultPath(self, key): default_path = self.getPreferences().getValue("local_file/%s" % key) - return QUrl.fromLocalFile(default_path) + if os.path.exists(default_path): + return QUrl.fromLocalFile(default_path) + return QUrl() @pyqtSlot(str, str) def setDefaultPath(self, key, default_path):