mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 13:34:01 -06:00
Fix setting the default path on OSX
Contributes to CURA-1987
This commit is contained in:
parent
570a67556a
commit
14d4b1f881
1 changed files with 3 additions and 2 deletions
|
@ -203,7 +203,7 @@ class CuraApplication(QtApplication):
|
|||
"dialog_profile_path",
|
||||
"dialog_material_path"]:
|
||||
|
||||
Preferences.getInstance().addPreference("local_file/%s" % key, "~/")
|
||||
Preferences.getInstance().addPreference("local_file/%s" % key, os.path.expanduser("~/"))
|
||||
|
||||
Preferences.getInstance().setDefault("local_file/last_used_type", "text/x-gcode")
|
||||
|
||||
|
@ -346,6 +346,7 @@ class CuraApplication(QtApplication):
|
|||
@pyqtSlot(str, result = QUrl)
|
||||
def getDefaultPath(self, key):
|
||||
default_path = Preferences.getInstance().getValue("local_file/%s" % key)
|
||||
print(default_path)
|
||||
return QUrl.fromLocalFile(default_path)
|
||||
|
||||
@pyqtSlot(str, str)
|
||||
|
@ -896,4 +897,4 @@ class CuraApplication(QtApplication):
|
|||
self._additional_components[area_id] = []
|
||||
self._additional_components[area_id].append(component)
|
||||
|
||||
self.additionalComponentsChanged.emit(area_id)
|
||||
self.additionalComponentsChanged.emit(area_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue