Simplify text generaton for download button

CURA-3856
This commit is contained in:
Jaime van Kessel 2017-06-28 15:35:13 +02:00
parent 4a5b1d0760
commit e9d2434c41

View file

@ -88,7 +88,7 @@ UM.Dialog
Button Button
{ {
id: downloadButton id: downloadButton
text: !model.already_installed ? catalog.i18nc("@action:button", "Download") : model.can_upgrade ? catalog.i18nc("@action:button", "Upgrade") : catalog.i18nc("@action:button", "Download") text: (model.already_installed && model.can_upgrade) ? catalog.i18nc("@action:button", "Upgrade") : catalog.i18nc("@action:button", "Download")
onClicked: manager.downloadAndInstallPlugin(model.file_location) onClicked: manager.downloadAndInstallPlugin(model.file_location)
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.rightMargin: UM.Theme.getSize("default_margin").width