Merge pull request #69072 from souplamp/history-dock-check-connected
Add history dock to default editor layout, and prevent signal connecting multiple times
This commit is contained in:
commit
e836284667
2 changed files with 2 additions and 2 deletions
|
@ -7036,7 +7036,7 @@ EditorNode::EditorNode() {
|
||||||
// Dock numbers are based on DockSlot enum value + 1.
|
// 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_3", "Scene,Import");
|
||||||
default_layout->set_value(docks_section, "dock_4", "FileSystem");
|
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++) {
|
for (int i = 0; i < vsplits.size(); i++) {
|
||||||
default_layout->set_value(docks_section, "dock_split_" + itos(i + 1), 0);
|
default_layout->set_value(docks_section, "dock_split_" + itos(i + 1), 0);
|
||||||
|
|
|
@ -206,7 +206,7 @@ void HistoryDock::seek_history(int p_index) {
|
||||||
|
|
||||||
void HistoryDock::_notification(int p_notification) {
|
void HistoryDock::_notification(int p_notification) {
|
||||||
switch (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));
|
EditorNode::get_singleton()->connect("scene_changed", callable_mp(this, &HistoryDock::on_history_changed));
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue