mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-10 08:19:00 +08:00
Show 'Done' button when sync was successful
And make it close the window when pressed then. Contributes to issue CURA-8609.
This commit is contained in:
parent
5b14792c76
commit
bfb8d9ddf1
@ -452,8 +452,29 @@ Window
|
||||
{
|
||||
id: syncButton
|
||||
anchors.right: parent.right
|
||||
text: (typeof syncModel !== "undefined" && syncModel.exportUploadStatus == "error") ? catalog.i18nc("@button", "Try again") : catalog.i18nc("@button", "Sync")
|
||||
onClicked: syncModel.exportUpload()
|
||||
text:
|
||||
{
|
||||
if(typeof syncModel !== "undefined" && syncModel.exportUploadStatus == "error")
|
||||
{
|
||||
return catalog.i18nc("@button", "Try again");
|
||||
}
|
||||
if(typeof syncModel !== "undefined" && syncModel.exportUploadStatus == "success")
|
||||
{
|
||||
return catalog.i18nc("@button", "Done");
|
||||
}
|
||||
return catalog.i18nc("@button", "Sync");
|
||||
}
|
||||
onClicked:
|
||||
{
|
||||
if(typeof syncModel !== "undefined" && syncModel.exportUploadStatus == "success")
|
||||
{
|
||||
materialsSyncDialog.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
syncModel.exportUpload();
|
||||
}
|
||||
}
|
||||
visible:
|
||||
{
|
||||
if(!syncModel) //When the dialog is created, this is not set yet.
|
||||
|
Loading…
x
Reference in New Issue
Block a user