diff options
Diffstat (limited to 'scene/gui/tree.cpp')
-rw-r--r-- | scene/gui/tree.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index ace3edfcb0..3458b87b8d 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -4850,7 +4850,11 @@ void Tree::_do_incr_search(const String &p_add) { return; } - item->select(col); + if (select_mode == SELECT_MULTI) { + item->set_as_cursor(col); + } else { + item->select(col); + } ensure_cursor_is_visible(); } @@ -5180,6 +5184,7 @@ void Tree::_bind_methods() { ClassDB::bind_method(D_METHOD("get_pressed_button"), &Tree::get_pressed_button); ClassDB::bind_method(D_METHOD("set_select_mode", "mode"), &Tree::set_select_mode); ClassDB::bind_method(D_METHOD("get_select_mode"), &Tree::get_select_mode); + ClassDB::bind_method(D_METHOD("deselect_all"), &Tree::deselect_all); ClassDB::bind_method(D_METHOD("set_columns", "amount"), &Tree::set_columns); ClassDB::bind_method(D_METHOD("get_columns"), &Tree::get_columns); |