From 287689a073befd0d4da7612d26810410b1a03ae0 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 12 Oct 2018 13:25:34 +0200 Subject: [PATCH] Don't cache the automatic firmware name The QML property was not updated when you change the printer. By not caching it, it gets the current printer's firmware file upon clicking the button. Simple and effective, and not that tough on computational power that it needs caching. Contributes to issue CURA-5749. --- .../UltimakerMachineActions/UpgradeFirmwareMachineAction.qml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/UltimakerMachineActions/UpgradeFirmwareMachineAction.qml b/plugins/UltimakerMachineActions/UpgradeFirmwareMachineAction.qml index ed771d2a04..fff7d2c46f 100644 --- a/plugins/UltimakerMachineActions/UpgradeFirmwareMachineAction.qml +++ b/plugins/UltimakerMachineActions/UpgradeFirmwareMachineAction.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2016 Ultimaker B.V. +// Copyright (c) 2018 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 @@ -58,7 +58,6 @@ Cura.MachineAction anchors.horizontalCenter: parent.horizontalCenter width: childrenRect.width spacing: UM.Theme.getSize("default_margin").width - property var firmwareName: Cura.USBPrinterManager.getDefaultFirmwareName() Button { id: autoUpgradeButton @@ -66,7 +65,7 @@ Cura.MachineAction enabled: parent.firmwareName != "" && activeOutputDevice onClicked: { - activeOutputDevice.updateFirmware(parent.firmwareName) + activeOutputDevice.updateFirmware(Cura.USBPrinterManager.getDefaultFirmwareName()) } } Button