mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Pass the "add to recent" as an input var to dialogs that open projects
This way it is clear before to the dialog whether it should add the file to the recent files list, before the dialog opens. CURA-7996
This commit is contained in:
parent
b54f792561
commit
f8a9e7f2d2
4 changed files with 13 additions and 9 deletions
|
@ -29,6 +29,7 @@ UM.Dialog
|
|||
modality: Qt.WindowModal
|
||||
|
||||
property var fileUrl
|
||||
property var addToRecent: true
|
||||
|
||||
// load the entire project
|
||||
function loadProjectFile() {
|
||||
|
@ -37,8 +38,7 @@ UM.Dialog
|
|||
UM.Preferences.setValue("cura/choice_on_open_project", "open_as_project")
|
||||
}
|
||||
|
||||
var addToRecent = UM.WorkspaceFileHandler.getAddToRecentFilesHint(base.fileUrl);
|
||||
UM.WorkspaceFileHandler.readLocalFile(base.fileUrl, addToRecent);
|
||||
UM.WorkspaceFileHandler.readLocalFile(base.fileUrl, base.addToRecent);
|
||||
|
||||
base.hide()
|
||||
}
|
||||
|
@ -50,8 +50,7 @@ UM.Dialog
|
|||
UM.Preferences.setValue("cura/choice_on_open_project", "open_as_model")
|
||||
}
|
||||
|
||||
var addToRecent = UM.WorkspaceFileHandler.getAddToRecentFilesHint(base.fileUrl);
|
||||
CuraApplication.readLocalFile(base.fileUrl, "open_as_model", addToRecent)
|
||||
CuraApplication.readLocalFile(base.fileUrl, "open_as_model", base.addToRecent)
|
||||
|
||||
base.hide()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue