Browse Source

wxGUI/settings: fix updating nested dict (#1823)

Problem shows up for settings of external GUI plugins, that are not in the default dict.
Anna Petrasova 3 years ago
parent
commit
c863b71ee7
1 changed files with 4 additions and 1 deletions
  1. 4 1
      gui/wxpython/core/settings.py

+ 4 - 1
gui/wxpython/core/settings.py

@@ -906,9 +906,12 @@ class Settings:
             """Recursively update nested dictionary by another nested dictionary"""
             for key, value in update.items():
                 if isinstance(value, collections.abc.Mapping):
-                    update_nested_dict_by_dict(dictionary.get(key, {}), value)
+                    dictionary[key] = update_nested_dict_by_dict(
+                        dictionary.get(key, {}), value
+                    )
                 else:
                     dictionary[key] = value
+            return dictionary
 
         try:
             with open(self.filePath, "r") as f: