diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index e2e82eb65a..9493153bf7 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1735,6 +1735,7 @@ class CuraApplication(QtApplication): openProjectFile = pyqtSignal(QUrl, arguments = ["project_file"]) # Emitted when a project file is about to open. + @pyqtSlot(QUrl, str, bool) @pyqtSlot(QUrl, str) @pyqtSlot(QUrl) def readLocalFile(self, file: QUrl, project_mode: Optional[str] = None, add_to_recent_files: bool = True): diff --git a/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml b/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml index 68f58616f1..8c29fc7845 100644 --- a/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml +++ b/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml @@ -37,7 +37,8 @@ UM.Dialog UM.Preferences.setValue("cura/choice_on_open_project", "open_as_project") } - UM.WorkspaceFileHandler.readLocalFile(base.fileUrl) + var addToRecent = UM.WorkspaceFileHandler.getAddToRecentFilesHint(base.fileUrl); + UM.WorkspaceFileHandler.readLocalFile(base.fileUrl, addToRecent); base.hide() } diff --git a/resources/qml/Dialogs/OpenFilesIncludingProjectsDialog.qml b/resources/qml/Dialogs/OpenFilesIncludingProjectsDialog.qml index 62cded866c..2ba8a409ef 100644 --- a/resources/qml/Dialogs/OpenFilesIncludingProjectsDialog.qml +++ b/resources/qml/Dialogs/OpenFilesIncludingProjectsDialog.qml @@ -32,7 +32,8 @@ UM.Dialog function loadProjectFile(projectFile) { - UM.WorkspaceFileHandler.readLocalFile(projectFile); + var addToRecent = UM.WorkspaceFileHandler.getAddToRecentFilesHint(projectFile); + UM.WorkspaceFileHandler.readLocalFile(projectFile, addToRecent); } function loadModelFiles(fileUrls)