mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -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
|
@ -1733,7 +1733,7 @@ class CuraApplication(QtApplication):
|
|||
def log(self, msg):
|
||||
Logger.log("d", msg)
|
||||
|
||||
openProjectFile = pyqtSignal(QUrl, arguments = ["project_file"]) # Emitted when a project file is about to open.
|
||||
openProjectFile = pyqtSignal(QUrl, bool, arguments = ["project_file", "add_to_recent_files"]) # Emitted when a project file is about to open.
|
||||
|
||||
@pyqtSlot(QUrl, str, bool)
|
||||
@pyqtSlot(QUrl, str)
|
||||
|
@ -1773,7 +1773,7 @@ class CuraApplication(QtApplication):
|
|||
|
||||
if is_project_file and project_mode == "always_ask":
|
||||
# present a dialog asking to open as project or import models
|
||||
self.callLater(self.openProjectFile.emit, file)
|
||||
self.callLater(self.openProjectFile.emit, file, add_to_recent_files)
|
||||
return
|
||||
|
||||
# Either the file is a model file or we want to load only models from project. Continue to load models.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue