mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 01:59:17 +08:00
Avoid printer connection when the status is 'error' - CURA-3868
This commit is contained in:
parent
e97bdc526b
commit
2915199367
@ -775,6 +775,11 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
|
|
||||||
## Start requesting data from printer
|
## Start requesting data from printer
|
||||||
def connect(self):
|
def connect(self):
|
||||||
|
# Don't allow to connect to a printer with a faulty connection state.
|
||||||
|
# For instance when switching printers but the printer is disconnected from the network
|
||||||
|
if self._connection_state == ConnectionState.error:
|
||||||
|
return
|
||||||
|
|
||||||
if self.isConnected():
|
if self.isConnected():
|
||||||
self.close() # Close previous connection
|
self.close() # Close previous connection
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user