From 339d7ca4c9e5da8e7277f2a40237fae1b811ddec Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 30 Nov 2017 14:36:53 +0100 Subject: [PATCH] Cluster shows default controlItem again when a specific printer is selected CL-541 --- plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py | 8 ++++++++ resources/qml/PrintMonitor.qml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py index da26e77643..f4675a2e0a 100644 --- a/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py +++ b/plugins/UM3NetworkPrinting/ClusterUM3OutputDevice.py @@ -61,6 +61,14 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice): self._active_printer = None # type: Optional[PrinterOutputModel] + @pyqtProperty(QObject, notify=activePrinterChanged) + def controlItem(self): + if self._active_printer is None: + return super().controlItem + else: + # Let cura use the default. + return None + def requestWrite(self, nodes, file_name=None, filter_by_machine=False, file_handler=None, **kwargs): # Notify the UI that a switch to the print monitor should happen Application.getInstance().showPrintMonitor.emit(True) diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index 830093cd2b..b3c36f7fd4 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -45,7 +45,7 @@ Column Repeater { id: extrudersRepeater - model: activePrinter.extruders + model: activePrinter!=null ? activePrinter.extruders : null ExtruderBox {