summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-01-25 07:37:42 +0100
committerGitHub <noreply@github.com>2017-01-25 07:37:42 +0100
commit355ce0d0de2787c9dba25d623c1a4cda314d12d5 (patch)
tree84c77b2c5491ddfbc7f34dfad488891263a1736c /tools
parent572692389719c67b2189ab07f8f9523cf6c82cca (diff)
parent35b7295a714841c2fad6024331d7ab92b559f0aa (diff)
Merge pull request #7635 from RandomShaper/fs-split-layout
Include filesystem dock split offset in editor layouts
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_node.cpp8
-rw-r--r--tools/editor/filesystem_dock.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 2d66429ea5..03f5772dee 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -4514,6 +4514,8 @@ void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String& p
}
}
+ p_layout->set_value(p_section,"dock_filesystem_split",filesystem_dock->get_split_offset());
+
VSplitContainer*splits[DOCK_SLOT_MAX/2]={
left_l_vsplit,
left_r_vsplit,
@@ -4690,6 +4692,12 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String&
}
}
+ int fs_split_ofs = 0;
+ if (p_layout->has_section_key(p_section,"dock_filesystem_split")) {
+ fs_split_ofs = p_layout->get_value(p_section,"dock_filesystem_split");
+ }
+ filesystem_dock->set_split_offset(fs_split_ofs);
+
VSplitContainer*splits[DOCK_SLOT_MAX/2]={
left_l_vsplit,
left_r_vsplit,
diff --git a/tools/editor/filesystem_dock.h b/tools/editor/filesystem_dock.h
index 382fcf198d..a5a1df0955 100644
--- a/tools/editor/filesystem_dock.h
+++ b/tools/editor/filesystem_dock.h
@@ -199,6 +199,9 @@ public:
void set_display_mode(int p_mode);
+ int get_split_offset() { return split_box->get_split_offset(); }
+ void set_split_offset(int p_offset) { split_box->set_split_offset(p_offset); }
+
FileSystemDock(EditorNode *p_editor);
~FileSystemDock();
};