summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsouplamp <camden.mcall@gmail.com>2022-11-23 18:30:20 -0600
committersouplamp <camden.mcall@gmail.com>2022-11-24 11:45:42 -0600
commit51cf968e5620042af9f8a879f1d53f8942c8531a (patch)
treef821caae65f4ff1a37a4c556f1db2a850c0ca8bf
parent7f8ecffa56834dce3ccbd736738b613d51133dea (diff)
History dock singleton, set default editor layout, ready notification
- add the history dock to the default editor layout, so when a user does Editor -> Editor Layout -> Default the history dock will no longer disappear - change the enter tree notification to a ready notification to prevent the history dock from trying to connect 'on_history_changed' signal everytime the dock is moved in the editor layout
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/history_dock.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index f277bf6467..1d31b6c7d9 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -7035,7 +7035,7 @@ EditorNode::EditorNode() {
// Dock numbers are based on DockSlot enum value + 1.
default_layout->set_value(docks_section, "dock_3", "Scene,Import");
default_layout->set_value(docks_section, "dock_4", "FileSystem");
- default_layout->set_value(docks_section, "dock_5", "Inspector,Node");
+ default_layout->set_value(docks_section, "dock_5", "Inspector,Node,History");
for (int i = 0; i < vsplits.size(); i++) {
default_layout->set_value(docks_section, "dock_split_" + itos(i + 1), 0);
diff --git a/editor/history_dock.cpp b/editor/history_dock.cpp
index 47b7e9f5d7..93599eff56 100644
--- a/editor/history_dock.cpp
+++ b/editor/history_dock.cpp
@@ -206,7 +206,7 @@ void HistoryDock::seek_history(int p_index) {
void HistoryDock::_notification(int p_notification) {
switch (p_notification) {
- case NOTIFICATION_ENTER_TREE: {
+ case NOTIFICATION_READY: {
EditorNode::get_singleton()->connect("scene_changed", callable_mp(this, &HistoryDock::on_history_changed));
} break;