mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 10:32:54 -05:00
Merge pull request #101842 from havi05/tree-fix-ui_select
Tree - fix `ui_select`
This commit is contained in:
commit
672fd7b0bb
1 changed files with 9 additions and 9 deletions
|
@ -3682,15 +3682,6 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
|||
prev->select(selected_col);
|
||||
}
|
||||
ensure_cursor_is_visible();
|
||||
} else if (p_event->is_action("ui_accept") && p_event->is_pressed()) {
|
||||
if (selected_item) {
|
||||
//bring up editor if possible
|
||||
if (!edit_selected()) {
|
||||
emit_signal(SNAME("item_activated"));
|
||||
incr_search.clear();
|
||||
}
|
||||
}
|
||||
accept_event();
|
||||
} else if (p_event->is_action("ui_select") && p_event->is_pressed()) {
|
||||
if (select_mode == SELECT_MULTI) {
|
||||
if (!selected_item) {
|
||||
|
@ -3705,6 +3696,15 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
|||
}
|
||||
}
|
||||
accept_event();
|
||||
} else if (p_event->is_action("ui_accept") && p_event->is_pressed()) {
|
||||
if (selected_item) {
|
||||
//bring up editor if possible
|
||||
if (!edit_selected()) {
|
||||
emit_signal(SNAME("item_activated"));
|
||||
incr_search.clear();
|
||||
}
|
||||
}
|
||||
accept_event();
|
||||
}
|
||||
|
||||
if (allow_search && k.is_valid()) { // Incremental search
|
||||
|
|
Loading…
Reference in a new issue