Просмотр исходного кода

Merge branch '4.1' of github.com:Ultimaker/Cura

Jaime van Kessel 5 лет назад
Родитель
Сommit
b1375a9927
2 измененных файлов с 5 добавлено и 3 удалено
  1. 4 1
      cura/OAuth2/AuthorizationService.py
  2. 1 2
      cura/Settings/SettingOverrideDecorator.py

+ 4 - 1
cura/OAuth2/AuthorizationService.py

@@ -99,7 +99,9 @@ class AuthorizationService:
             Logger.log("w", "Unable to use the refresh token to get a new access token.")
             # The token could not be refreshed using the refresh token. We should login again.
             return None
-
+        # Ensure it gets stored as otherwise we only have it in memory. The stored refresh token has been deleted
+        # from the server already.
+        self._storeAuthData(self._auth_data)
         return self._auth_helpers.parseJWT(self._auth_data.access_token)
 
     ##  Get the access token as provided by the repsonse data.
@@ -198,6 +200,7 @@ class AuthorizationService:
 
     ##  Store authentication data in preferences.
     def _storeAuthData(self, auth_data: Optional[AuthenticationResponse] = None) -> None:
+        Logger.log("d", "Attempting to store the auth data")
         if self._preferences is None:
             Logger.log("e", "Unable to save authentication data, since no preference has been set!")
             return

+ 1 - 2
cura/Settings/SettingOverrideDecorator.py

@@ -121,8 +121,7 @@ class SettingOverrideDecorator(SceneNodeDecorator):
 
                 if self._is_non_printing_mesh != new_is_non_printing_mesh:
                     self._is_non_printing_mesh = new_is_non_printing_mesh
-                    self._node.setCalculateBoundingBox(not self._is_non_printing_mesh)
-
+               
             Application.getInstance().getBackend().needsSlicing()
             Application.getInstance().getBackend().tickle()