mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-19 03:37:29 +08:00
Change button to 'done' once USB export has completed
Also important to keep in mind: It won't change to 'done' if the user cancelled the file dialogue. Contributes to issue CURA-8609.
This commit is contained in:
parent
6c416742fb
commit
c58d03ad4c
@ -682,12 +682,22 @@ Window
|
||||
}
|
||||
Cura.PrimaryButton
|
||||
{
|
||||
id: exportUsbButton
|
||||
anchors.right: parent.right
|
||||
text: catalog.i18nc("@button", "Export material archive")
|
||||
|
||||
property bool hasExported: false
|
||||
text: hasExported ? catalog.i18nc("@button", "Done") : catalog.i18nc("@button", "Export material archive")
|
||||
onClicked:
|
||||
{
|
||||
exportUsbDialog.folder = syncModel.getPreferredExportAllPath();
|
||||
exportUsbDialog.open();
|
||||
if(!hasExported)
|
||||
{
|
||||
exportUsbDialog.folder = syncModel.getPreferredExportAllPath();
|
||||
exportUsbDialog.open();
|
||||
}
|
||||
else
|
||||
{
|
||||
materialsSyncDialog.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -719,6 +729,7 @@ Window
|
||||
{
|
||||
syncModel.exportAll(fileUrl);
|
||||
CuraApplication.setDefaultPath("dialog_material_path", folder);
|
||||
exportUsbButton.hasExported = true;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user