Remove usage of canUpdate slot

This makes it a bit cleaner, since having it as a slot is a bit weird in the first place (and forced
all kinds of hacks to ensure it got re-evaluated)

CURA-6151
This commit is contained in:
Jaime van Kessel 2019-03-27 12:54:20 +01:00
parent f4f94b10d2
commit e3f2c06542
3 changed files with 2 additions and 23 deletions

View file

@ -10,7 +10,7 @@ import Cura 1.1 as Cura
Column
{
property bool canUpdate: false
property bool canUpdate: CuraApplication.getPackageManager().packagesWithUpdate.indexOf(model.id) != -1
property bool canDowngrade: false
property bool loginRequired: model.login_required && !Cura.API.account.isLoggedIn
width: UM.Theme.getSize("toolbox_action_button").width
@ -83,7 +83,6 @@ Column
target: toolbox
onMetadataChanged:
{
canUpdate = toolbox.canUpdate(model.id)
canDowngrade = toolbox.canDowngrade(model.id)
}
}