From 06afed5283131e03a45f7e9828a76f89f4eb0bcd Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 29 Feb 2016 16:11:48 +0100 Subject: [PATCH] Loading files now uses home folder as default location CURA-906 --- cura/CuraApplication.py | 4 ++++ resources/qml/Cura.qml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 6e4527feec..f8bf5da148 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -129,6 +129,10 @@ class CuraApplication(QtApplication): continue self._recent_files.append(QUrl.fromLocalFile(f)) + + @pyqtSlot(result = QUrl) + def getDefaultSavePath(self): + return QUrl.fromLocalFile(os.path.expanduser("~/")) ## Handle loading of all plugin types (and the backend explicitly) # \sa PluginRegistery diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index cdd97b84cb..76a367607a 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -667,7 +667,7 @@ UM.MainWindow //TODO: Support multiple file selection, workaround bug in KDE file dialog //selectMultiple: true nameFilters: UM.MeshFileHandler.supportedReadFileTypes; - + folder: Printer.getDefaultSavePath() onAccepted: { //Because several implementations of the file dialog only update the folder