mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-21 20:19:32 +08:00
Moved auth state changed check to first thing set auth checks
This should contribute to the windows authentication issues. Most windows devices seemed to get all the auth state messages twice.
This commit is contained in:
parent
6dcd3b44b6
commit
c06ffe6cae
@ -327,6 +327,9 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||
## Set the authentication state.
|
||||
# \param auth_state \type{AuthState} Enum value representing the new auth state
|
||||
def setAuthenticationState(self, auth_state):
|
||||
if auth_state == self._authentication_state:
|
||||
return # Nothing to do here.
|
||||
|
||||
if auth_state == AuthState.AuthenticationRequested:
|
||||
Logger.log("d", "Authentication state changed to authentication requested.")
|
||||
self.setAcceptsCommands(False)
|
||||
@ -367,9 +370,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||
self._authentication_timer.stop()
|
||||
self._authentication_counter = 0
|
||||
|
||||
if auth_state != self._authentication_state:
|
||||
self._authentication_state = auth_state
|
||||
self.authenticationStateChanged.emit()
|
||||
self._authentication_state = auth_state
|
||||
self.authenticationStateChanged.emit()
|
||||
|
||||
authenticationStateChanged = pyqtSignal()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user