Connection state signal is now connected before connect is called

CURA-1339
This commit is contained in:
Jaime van Kessel 2016-04-18 15:05:21 +02:00
parent 8a47903374
commit 2c489ed054

View file

@ -190,8 +190,8 @@ class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin,
## Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
def addOutputDevice(self, serial_port):
device = USBPrinterOutputDevice.USBPrinterOutputDevice(serial_port)
device.connect()
device.connectionStateChanged.connect(self._onConnectionStateChanged)
device.connect()
device.progressChanged.connect(self.progressChanged)
self._usb_output_devices[serial_port] = device