Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantinos Karmas <konskarm@gmail.com>2021-06-22 16:16:13 +0300
committerKonstantinos Karmas <konskarm@gmail.com>2021-06-22 16:16:13 +0300
commit7c72e842150dc99c534b95731ecb6b67fd96ae09 (patch)
tree424bd4c0600051a07f27cb439c3df37798a6ee69 /cura/Backups
parent3331b7c267fa9a68a50039f8f47bef1ae415f66e (diff)
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
Diffstat (limited to 'cura/Backups')
-rw-r--r--cura/Backups/Backup.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cura/Backups/Backup.py b/cura/Backups/Backup.py
index 5fad2ccf19..74ef43f5b2 100644
--- a/cura/Backups/Backup.py
+++ b/cura/Backups/Backup.py
@@ -166,6 +166,9 @@ class Backup:
Logger.log("d", "Moving preferences file from %s to %s", 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
self._illuminate(**secrets)