浏览代码

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 年之前
父节点
当前提交
c863b71ee7
共有 1 个文件被更改,包括 4 次插入1 次删除
  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: