mirror of
https://github.com/godotengine/godot.git
synced 2025-04-01 00:41:35 +08:00
Merge pull request #86218 from TheSofox/arrow-key-scene-tree-nav
Fix `Node` selection when navigating `Tree` with Arrow keys
This commit is contained in:
commit
b8635157eb
@ -3244,8 +3244,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;
|
||||
@ -3277,8 +3277,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user