mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-19 07:17:30 +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
|
Cura.PrimaryButton
|
||||||
{
|
{
|
||||||
|
id: exportUsbButton
|
||||||
anchors.right: parent.right
|
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:
|
onClicked:
|
||||||
{
|
{
|
||||||
exportUsbDialog.folder = syncModel.getPreferredExportAllPath();
|
if(!hasExported)
|
||||||
exportUsbDialog.open();
|
{
|
||||||
|
exportUsbDialog.folder = syncModel.getPreferredExportAllPath();
|
||||||
|
exportUsbDialog.open();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
materialsSyncDialog.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -719,6 +729,7 @@ Window
|
|||||||
{
|
{
|
||||||
syncModel.exportAll(fileUrl);
|
syncModel.exportAll(fileUrl);
|
||||||
CuraApplication.setDefaultPath("dialog_material_path", folder);
|
CuraApplication.setDefaultPath("dialog_material_path", folder);
|
||||||
|
exportUsbButton.hasExported = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user