mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Avoid printer connection when the status is 'error' - CURA-3868
This commit is contained in:
parent
e97bdc526b
commit
2915199367
1 changed files with 5 additions and 0 deletions
|
@ -775,6 +775,11 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
|
||||
## Start requesting data from printer
|
||||
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():
|
||||
self.close() # Close previous connection
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue