mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 10:32:54 -05:00
Tree - fix ui_select
This commit is contained in:
parent
791c87eb7a
commit
522d6fed70
1 changed files with 9 additions and 9 deletions
|
@ -3680,15 +3680,6 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
prev->select(selected_col);
|
prev->select(selected_col);
|
||||||
}
|
}
|
||||||
ensure_cursor_is_visible();
|
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()) {
|
} else if (p_event->is_action("ui_select") && p_event->is_pressed()) {
|
||||||
if (select_mode == SELECT_MULTI) {
|
if (select_mode == SELECT_MULTI) {
|
||||||
if (!selected_item) {
|
if (!selected_item) {
|
||||||
|
@ -3703,6 +3694,15 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
accept_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
|
if (allow_search && k.is_valid()) { // Incremental search
|
||||||
|
|
Loading…
Reference in a new issue