mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Small fixes so switching printers correctly connects / disconnects output devices
CURA-1036
This commit is contained in:
parent
ac4dbe2304
commit
7d258485c8
2 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,6 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
|||
self._zero_conf.close()
|
||||
|
||||
def _onGlobalStackChanged(self):
|
||||
|
||||
active_machine = Application.getInstance().getGlobalContainerStack()
|
||||
if not active_machine:
|
||||
return
|
||||
|
@ -41,6 +40,7 @@ class NetworkPrinterOutputDevicePlugin(OutputDevicePlugin):
|
|||
if key == active_machine.getMetaDataEntry("key"):
|
||||
self._printers[key].connect()
|
||||
self._printers[key].connectionStateChanged.connect(self._onPrinterConnectionStateChanged)
|
||||
else:
|
||||
self._printers[key].close()
|
||||
|
||||
## Because the model needs to be created in the same thread as the QMLEngine, we use a signal.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue