mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Close now resets authentication & timeout data.
CURA-1936
This commit is contained in:
parent
5f51804ba6
commit
86a65e495b
1 changed files with 13 additions and 2 deletions
|
@ -266,11 +266,21 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
self.setConnectionState(ConnectionState.closed)
|
||||
if self._progress_message:
|
||||
self._progress_message.hide()
|
||||
|
||||
# Reset authentication state
|
||||
self._authentication_requested_message.hide()
|
||||
if self._error_message:
|
||||
self._error_message.hide()
|
||||
self._authentication_state = AuthState.NotAuthenticated
|
||||
self._authentication_counter = 0
|
||||
self._authentication_timer.stop()
|
||||
|
||||
if self._error_message:
|
||||
self._error_message.hide()
|
||||
|
||||
# Reset timeout state
|
||||
self._connection_state_before_timeout = None
|
||||
self._last_response_time = time()
|
||||
|
||||
# Stop update timers
|
||||
self._update_timer.stop()
|
||||
self._camera_timer.stop()
|
||||
|
||||
|
@ -313,6 +323,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
|||
|
||||
## Start requesting data from printer
|
||||
def connect(self):
|
||||
self.close() # Ensure that previous connection (if any) is killed.
|
||||
self.setConnectionState(ConnectionState.connecting)
|
||||
self._update() # Manually trigger the first update, as we don't want to wait a few secs before it starts.
|
||||
self._update_camera()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue