Fixes Node selection when navigating SceneTree with Arrow keys
This commit is contained in:
parent
f8a2a91936
commit
f894eb1768
@ -3233,8 +3233,8 @@ void Tree::_go_up() {
|
|||||||
if (!prev) {
|
if (!prev) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
selected_item = prev;
|
|
||||||
emit_signal(SNAME("cell_selected"));
|
select_single_item(prev, get_root(), selected_col);
|
||||||
queue_redraw();
|
queue_redraw();
|
||||||
} else {
|
} else {
|
||||||
int col = selected_col < 0 ? 0 : selected_col;
|
int col = selected_col < 0 ? 0 : selected_col;
|
||||||
@ -3266,8 +3266,7 @@ void Tree::_go_down() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
selected_item = next;
|
select_single_item(next, get_root(), selected_col);
|
||||||
emit_signal(SNAME("cell_selected"));
|
|
||||||
queue_redraw();
|
queue_redraw();
|
||||||
} else {
|
} else {
|
||||||
int col = selected_col < 0 ? 0 : selected_col;
|
int col = selected_col < 0 ? 0 : selected_col;
|
||||||
|
Loading…
Reference in New Issue
Block a user