Fix showing extruder names in USB printing monitor

It was using a deprecated function. Apparently deprectated pyqtSlots don't work because it breaks the PyQt binding for some reason. That has to be fixed. But for now I'll make this use the non-deprecated function.
This commit is contained in:
Ghostkeeper 2019-07-25 15:17:13 +02:00
parent cfea12ab25
commit d353776fe8
No known key found for this signature in database
GPG Key ID: 86BEF881AE2CF276

View File

@ -1,3 +1,6 @@
//Copyright (c) 2019 Ultimaker B.V.
//Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
@ -35,7 +38,7 @@ Item
Label //Extruder name.
{
text: Cura.ExtruderManager.getExtruderName(position) != "" ? Cura.ExtruderManager.getExtruderName(position) : catalog.i18nc("@label", "Extruder")
text: Cura.MachineManager.activeMachine.extruders[position].name !== "" ? Cura.MachineManager.activeMachine.extruders[position].name : catalog.i18nc("@label", "Extruder")
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("default")
anchors.left: parent.left