Connection states changes are now tied into the UI again

CL-541
This commit is contained in:
Jaime van Kessel 2017-11-21 15:12:23 +01:00
parent 9cfe9769d3
commit 0f78b05802
4 changed files with 19 additions and 13 deletions

View file

@ -133,17 +133,17 @@ class MachineManager(QObject):
outputDevicesChanged = pyqtSignal()
def _onOutputDevicesChanged(self) -> None:
for printer_output_device in self._printer_output_devices:
'''for printer_output_device in self._printer_output_devices:
printer_output_device.hotendIdChanged.disconnect(self._onHotendIdChanged)
printer_output_device.materialIdChanged.disconnect(self._onMaterialIdChanged)
printer_output_device.materialIdChanged.disconnect(self._onMaterialIdChanged)'''
self._printer_output_devices.clear()
for printer_output_device in Application.getInstance().getOutputDeviceManager().getOutputDevices():
if isinstance(printer_output_device, PrinterOutputDevice):
self._printer_output_devices.append(printer_output_device)
printer_output_device.hotendIdChanged.connect(self._onHotendIdChanged)
printer_output_device.materialIdChanged.connect(self._onMaterialIdChanged)
#printer_output_device.hotendIdChanged.connect(self._onHotendIdChanged)
#printer_output_device.materialIdChanged.connect(self._onMaterialIdChanged)
self.outputDevicesChanged.emit()