You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Fix editor layout reset on startup
This commit is contained in:
@@ -5240,8 +5240,8 @@ void EditorNode::_copy_warning(const String &p_str) {
|
||||
}
|
||||
|
||||
void EditorNode::_save_editor_layout() {
|
||||
if (waiting_for_first_scan) {
|
||||
return; // Scanning, do not touch docks.
|
||||
if (!load_editor_layout_done) {
|
||||
return;
|
||||
}
|
||||
Ref<ConfigFile> config;
|
||||
config.instantiate();
|
||||
@@ -5297,9 +5297,7 @@ void EditorNode::_load_editor_layout() {
|
||||
if (overridden_default_layout >= 0) {
|
||||
_layout_menu_option(overridden_default_layout);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
} else {
|
||||
ep.step(TTR("Loading docks..."), 1, true);
|
||||
editor_dock_manager->load_docks_from_config(config, "docks");
|
||||
|
||||
@@ -5314,6 +5312,8 @@ void EditorNode::_load_editor_layout() {
|
||||
|
||||
ep.step(TTR("Editor layout ready."), 5, true);
|
||||
}
|
||||
load_editor_layout_done = true;
|
||||
}
|
||||
|
||||
void EditorNode::_save_central_editor_layout_to_config(Ref<ConfigFile> p_config_file) {
|
||||
// Bottom panel.
|
||||
|
||||
@@ -462,6 +462,7 @@ private:
|
||||
|
||||
bool requested_first_scan = false;
|
||||
bool waiting_for_first_scan = true;
|
||||
bool load_editor_layout_done = false;
|
||||
|
||||
int current_menu_option = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user