diff options
author | MinusKube <minuskube@gmail.com> | 2022-07-11 20:57:47 +0200 |
---|---|---|
committer | MinusKube <minuskube@gmail.com> | 2022-07-11 20:57:47 +0200 |
commit | b634688fca5230217afa1ead8627c4187db77b96 (patch) | |
tree | b0b8f320990e57dafefcf4f1b13d06562610eea5 /editor/editor_node.cpp | |
parent | 9b3972ad48393559f772151646304e28f938a6fa (diff) |
Fix editor dock layout not saving correctly
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 64665833df..089eab6af8 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4589,8 +4589,14 @@ void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String &p names += name; } + String config_key = "dock_" + itos(i + 1); + + if (p_layout->has_section_key(p_section, config_key)) { + p_layout->erase_section_key(p_section, config_key); + } + if (!names.is_empty()) { - p_layout->set_value(p_section, "dock_" + itos(i + 1), names); + p_layout->set_value(p_section, config_key, names); } } |