From f894eb17680eb99d3cdf3e6fce79a13dbe78119f Mon Sep 17 00:00:00 2001 From: Sofox Date: Fri, 15 Dec 2023 23:12:45 +0000 Subject: [PATCH] Fixes Node selection when navigating SceneTree with Arrow keys --- scene/gui/tree.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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;