Read preferences from new restored configs

Before calling the illuminate, we need to make sure that the previous cached Preferences have been overridden by the newly restored preferences from the backup. Otherwise, the `illuminate()` function will bring back the cached preferences and the new ones from the backup will be lost.

CURA-8313
This commit is contained in:
Konstantinos Karmas 2021-06-22 15:16:13 +02:00
parent 3331b7c267
commit 7c72e84215
2 changed files with 4 additions and 1 deletions

View file

@ -166,6 +166,9 @@ class Backup:
Logger.log("d", "Moving preferences file from %s to %s", backup_preferences_file, preferences_file) Logger.log("d", "Moving preferences file from %s to %s", backup_preferences_file, preferences_file)
shutil.move(backup_preferences_file, preferences_file) shutil.move(backup_preferences_file, preferences_file)
# Read the preferences from the newly restored configuration (or else the cached Preferences will override the restored ones)
self._application.readPreferencesFromConfiguration()
# Restore the obfuscated settings # Restore the obfuscated settings
self._illuminate(**secrets) self._illuminate(**secrets)