mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #113306 from Eshaan-byte/fix-dock-infinite-append
Editor: Fix infinite appending of docks without slots to config
This commit is contained in:
commit
da3233a5b4
1 changed files with 7 additions and 0 deletions
|
|
@ -600,6 +600,13 @@ void EditorDockManager::save_docks_to_config(Ref<ConfigFile> p_layout, const Str
|
|||
}
|
||||
}
|
||||
|
||||
// Clear the special dock slot for docks without default slots (index -1 = dock_0).
|
||||
// This prevents closed docks from being infinitely appended to the config on each save.
|
||||
const String no_slot_config_key = "dock_0";
|
||||
if (p_layout->has_section_key(p_section, no_slot_config_key)) {
|
||||
p_layout->erase_section_key(p_section, no_slot_config_key);
|
||||
}
|
||||
|
||||
// Save docks in windows.
|
||||
Dictionary floating_docks_dump;
|
||||
for (WindowWrapper *wrapper : dock_windows) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue