summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-07 22:21:33 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-10-07 22:21:33 +0200
commitf98ac421a815a6a7ce5492aa0b62c43127f28b58 (patch)
treed79a050090fe89515c54548979e903f08ca9ba5b
parent301bf9fa365fa730fe64ec4b5fa000b27a9aa75f (diff)
parent301a8fd559686ad9b617a89eba88eecb281bec7d (diff)
Merge pull request #67041 from HolonProduction/dock_move_bug
Fix a bug with moving dock left and right.
-rw-r--r--editor/editor_node.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index f83ff598c5..288ee4fa8f 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -4678,8 +4678,7 @@ void EditorNode::_dock_move_left() {
if (!current_ctl || !prev_ctl) {
return;
}
- dock_slot[dock_popup_selected_idx]->move_child(current_ctl, prev_ctl->get_index());
- dock_slot[dock_popup_selected_idx]->set_current_tab(dock_slot[dock_popup_selected_idx]->get_current_tab() - 1);
+ dock_slot[dock_popup_selected_idx]->move_child(current_ctl, prev_ctl->get_index(false));
dock_select->queue_redraw();
_edit_current();
_save_docks();
@@ -4691,8 +4690,7 @@ void EditorNode::_dock_move_right() {
if (!current_ctl || !next_ctl) {
return;
}
- dock_slot[dock_popup_selected_idx]->move_child(next_ctl, current_ctl->get_index());
- dock_slot[dock_popup_selected_idx]->set_current_tab(dock_slot[dock_popup_selected_idx]->get_current_tab() + 1);
+ dock_slot[dock_popup_selected_idx]->move_child(next_ctl, current_ctl->get_index(false));
dock_select->queue_redraw();
_edit_current();
_save_docks();