From 34e808d585cb1f6e74a74d012430c96850f6efe6 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 21 Nov 2017 16:36:51 +0100 Subject: [PATCH] PrinterOutputModel now has different extruders if it has more than one. It used to just fill the list with references to the first one created. CL-541 --- cura/PrinterOutput/PrinterOutputModel.py | 3 +-- resources/qml/PrintMonitor.qml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cura/PrinterOutput/PrinterOutputModel.py b/cura/PrinterOutput/PrinterOutputModel.py index 8a5a9b55be..9c1040fe1b 100644 --- a/cura/PrinterOutput/PrinterOutputModel.py +++ b/cura/PrinterOutput/PrinterOutputModel.py @@ -29,8 +29,7 @@ class PrinterOutputModel(QObject): self._name = "" self._key = "" # Unique identifier self._controller = output_controller - self._extruders = [ExtruderOutputModel(printer=self)] * number_of_extruders - + self._extruders = [ExtruderOutputModel(printer=self) for i in range(number_of_extruders)] self._head_position = Vector(0, 0, 0) self._active_print_job = None # type: Optional[PrintJobOutputModel] diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index 6c815827f6..23ab365861 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -51,7 +51,7 @@ Column { color: UM.Theme.getColor("sidebar") width: index == machineExtruderCount.properties.value - 1 && index % 2 == 0 ? extrudersGrid.width : Math.floor(extrudersGrid.width / 2 - UM.Theme.getSize("sidebar_lining_thin").width / 2) - extruderModel: activePrinter.extruders[index] + extruderModel: modelData } } }