mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 12:47:49 -06: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
1 changed files with 23 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue