2
0
Fork 0

Fix editor dock layout not saving correctly

4.0
MinusKube 2022-07-11 20:57:47 +07:00
parent 9b3972ad48
commit b634688fca
1 changed files with 7 additions and 1 deletions

@ -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);
}
}