mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 05:07:50 -06:00
Moved the update logic to the PackageManager
Contributes to CURA-8587
This commit is contained in:
parent
4991c39535
commit
d9f77d7ffd
4 changed files with 29 additions and 59 deletions
|
@ -254,7 +254,7 @@ Item
|
|||
ManageButton
|
||||
{
|
||||
id: updateManageButton
|
||||
visible: (showManageButtons || confirmed) && packageData.canUpdate && !installManageButton.confirmed
|
||||
visible: (showManageButtons || confirmed) && (packageData.canUpdate || confirmed) && !installManageButton.confirmed
|
||||
enabled: !installManageButton.busy
|
||||
|
||||
busy: packageData.isUpdating
|
||||
|
@ -265,12 +265,12 @@ Item
|
|||
|
||||
text:
|
||||
{
|
||||
if (packageData.isUpdating) { return catalog.i18nc("@button", "Updating..."); }
|
||||
else if (packageData.isRecentlyUpdated) { return catalog.i18nc("@button", "Updated"); }
|
||||
if (busy) { return catalog.i18nc("@button", "Updating..."); }
|
||||
else if (confirmed) { return catalog.i18nc("@button", "Updated"); }
|
||||
else { return catalog.i18nc("@button", "Update"); }
|
||||
}
|
||||
|
||||
onClicked: packageData.updatePackageTriggered(packageData.packageId)
|
||||
onClicked: packageData.updatePackageTriggered(packageData.packageId, packageData.downloadURL)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue