diff options
author | Vedat Gunel <vedatgunel@outlook.com> | 2023-12-23 21:01:01 +0300 |
---|---|---|
committer | Vedat Gunel <vedatgunel@outlook.com> | 2023-12-25 18:11:18 +0300 |
commit | f35f1a18496a9580247973f07a64e88899470325 (patch) | |
tree | 3e8128feabddea687d0388d0ea9f930650cbef3a /editor/editor_node.cpp | |
parent | 13a0d6e9b253654f5cc2a44f3d0b3cae10440443 (diff) | |
download | redot-engine-f35f1a18496a9580247973f07a64e88899470325.tar.gz |
Store horizontal and vertical split offsets separately in FileSystem dock
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index bd09019671..ab68a15b72 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5047,7 +5047,8 @@ void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String &p // Save FileSystemDock state. - p_layout->set_value(p_section, "dock_filesystem_split", FileSystemDock::get_singleton()->get_split_offset()); + p_layout->set_value(p_section, "dock_filesystem_h_split_offset", FileSystemDock::get_singleton()->get_h_split_offset()); + p_layout->set_value(p_section, "dock_filesystem_v_split_offset", FileSystemDock::get_singleton()->get_v_split_offset()); p_layout->set_value(p_section, "dock_filesystem_display_mode", FileSystemDock::get_singleton()->get_display_mode()); p_layout->set_value(p_section, "dock_filesystem_file_sort", FileSystemDock::get_singleton()->get_file_sort()); p_layout->set_value(p_section, "dock_filesystem_file_list_display_mode", FileSystemDock::get_singleton()->get_file_list_display_mode()); @@ -5272,9 +5273,14 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String // FileSystemDock. - if (p_layout->has_section_key(p_section, "dock_filesystem_split")) { - int fs_split_ofs = p_layout->get_value(p_section, "dock_filesystem_split"); - FileSystemDock::get_singleton()->set_split_offset(fs_split_ofs); + if (p_layout->has_section_key(p_section, "dock_filesystem_h_split_offset")) { + int fs_h_split_ofs = p_layout->get_value(p_section, "dock_filesystem_h_split_offset"); + FileSystemDock::get_singleton()->set_h_split_offset(fs_h_split_ofs); + } + + if (p_layout->has_section_key(p_section, "dock_filesystem_v_split_offset")) { + int fs_v_split_ofs = p_layout->get_value(p_section, "dock_filesystem_v_split_offset"); + FileSystemDock::get_singleton()->set_v_split_offset(fs_v_split_ofs); } if (p_layout->has_section_key(p_section, "dock_filesystem_display_mode")) { |