mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-10 15:29: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
|
id: syncButton
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: (typeof syncModel !== "undefined" && syncModel.exportUploadStatus == "error") ? catalog.i18nc("@button", "Try again") : catalog.i18nc("@button", "Sync")
|
text:
|
||||||
onClicked: syncModel.exportUpload()
|
{
|
||||||
|
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:
|
visible:
|
||||||
{
|
{
|
||||||
if(!syncModel) //When the dialog is created, this is not set yet.
|
if(!syncModel) //When the dialog is created, this is not set yet.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user