diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 8a243fd68f2..ec0530873a8 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -3233,8 +3233,8 @@ void Tree::_go_up() { if (!prev) { return; } - selected_item = prev; - emit_signal(SNAME("cell_selected")); + + select_single_item(prev, get_root(), selected_col); queue_redraw(); } else { int col = selected_col < 0 ? 0 : selected_col; @@ -3266,8 +3266,7 @@ void Tree::_go_down() { return; } - selected_item = next; - emit_signal(SNAME("cell_selected")); + select_single_item(next, get_root(), selected_col); queue_redraw(); } else { int col = selected_col < 0 ? 0 : selected_col;