From 6d402806ac2cbc914d701b58b50ac6a796c40a39 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Thu, 27 Sep 2018 13:35:18 +0200 Subject: [PATCH] Ensure logged in state is not always set to False after loading from preferences --- cura/API/Account.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cura/API/Account.py b/cura/API/Account.py index 18d9d5df03..d91276fb56 100644 --- a/cura/API/Account.py +++ b/cura/API/Account.py @@ -28,6 +28,10 @@ class Account(QObject): def __init__(self, parent = None) -> None: super().__init__(parent) + + self._error_message = None # type: Optional[Message] + self._logged_in = False + self._callback_port = 32118 self._oauth_root = "https://account.ultimaker.com" self._cloud_api_root = "https://api.ultimaker.com" @@ -48,9 +52,6 @@ class Account(QObject): self._authorization_service.onAuthStateChanged.connect(self._onLoginStateChanged) self._authorization_service.onAuthenticationError.connect(self._onLoginStateChanged) - self._error_message = None # type: Optional[Message] - self._logged_in = False - @pyqtProperty(bool, notify=loginStateChanged) def isLoggedIn(self) -> bool: return self._logged_in