diff options
author | Dawid Marzec <marzecdawid@gmail.com> | 2023-01-08 11:38:04 +0100 |
---|---|---|
committer | Dawid Marzec <marzecdawid@gmail.com> | 2023-01-08 12:41:27 +0100 |
commit | 9eeed06e65cbf5c3e124bd985f16e57807dbc8d5 (patch) | |
tree | 74fe10aa171c1a567bbf95b4142dcd8fca799e8f | |
parent | fcba87e696d58912838d8a4a6987b10efa28e78f (diff) | |
download | redot-engine-9eeed06e65cbf5c3e124bd985f16e57807dbc8d5.tar.gz |
Expose Tree::deselect_all to GDScript
-rw-r--r-- | doc/classes/Tree.xml | 6 | ||||
-rw-r--r-- | scene/gui/tree.cpp | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 584a2a2a7b..bfabd2d97d 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -52,6 +52,12 @@ The new item will be the [param idx]th child of parent, or it will be the last child if there are not enough siblings. </description> </method> + <method name="deselect_all"> + <return type="void" /> + <description> + Deselects all tree items (rows and columns). In [constant SELECT_MULTI] mode also removes selection cursor. + </description> + </method> <method name="edit_selected"> <return type="bool" /> <description> diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index ace3edfcb0..e76abe57ba 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -5180,6 +5180,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); |