mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Initial work for adding a save dialog for project saving
CURA-1263
This commit is contained in:
parent
bc8a9c30cf
commit
36d743384c
6 changed files with 283 additions and 9 deletions
|
@ -112,7 +112,17 @@ UM.MainWindow
|
|||
{
|
||||
id: saveWorkspaceMenu
|
||||
text: catalog.i18nc("@title:menu menubar:file","Save project")
|
||||
onTriggered: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, { "filter_by_machine": false, "file_type": "workspace" });
|
||||
onTriggered:
|
||||
{
|
||||
if(UM.Preferences.getValue("cura/dialog_on_project_save"))
|
||||
{
|
||||
saveWorkspaceDialog.open()
|
||||
}
|
||||
else
|
||||
{
|
||||
UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, { "filter_by_machine": false, "file_type": "workspace" })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem { action: Cura.Actions.reloadAll; }
|
||||
|
@ -500,15 +510,18 @@ UM.MainWindow
|
|||
|
||||
onVisibleChanged:
|
||||
{
|
||||
if(!visible)
|
||||
{
|
||||
// When the dialog closes, switch to the General page.
|
||||
// This prevents us from having a heavy page like Setting Visiblity active in the background.
|
||||
setPage(0);
|
||||
}
|
||||
// When the dialog closes, switch to the General page.
|
||||
// This prevents us from having a heavy page like Setting Visiblity active in the background.
|
||||
setPage(0);
|
||||
}
|
||||
}
|
||||
|
||||
WorkspaceSummaryDialog
|
||||
{
|
||||
id: saveWorkspaceDialog
|
||||
onYes: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, { "filter_by_machine": false, "file_type": "workspace" })
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: Cura.Actions.preferences
|
||||
|
@ -764,7 +777,7 @@ UM.MainWindow
|
|||
Connections
|
||||
{
|
||||
target: Cura.Actions.loadWorkspace
|
||||
onTriggered:openWorkspaceDialog.open()
|
||||
onTriggered: openWorkspaceDialog.open()
|
||||
}
|
||||
|
||||
EngineLog
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue