summaryrefslogtreecommitdiff
path: root/scene/gui/item_list.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2020-12-28 14:53:43 +0100
committerGitHub <noreply@github.com>2020-12-28 14:53:43 +0100
commitfeb4e5ed2cb463e0a2dde12d38681b346f7e0b3c (patch)
treeae0a1fec73157cece6aa857d5bf0a950acc795f5 /scene/gui/item_list.cpp
parente4c05723858dc6e644ebec4ea89fb6b562052fbd (diff)
parent7b293eddfb618699c86b421bdac9fdaf8d5f00d3 (diff)
Merge pull request #44569 from madmiraal/rename-unselect-deselect
Rename unselect to deselect
Diffstat (limited to 'scene/gui/item_list.cpp')
-rw-r--r--scene/gui/item_list.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 221e74d35b..30610c63b5 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -333,7 +333,7 @@ void ItemList::select(int p_idx, bool p_single) {
update();
}
-void ItemList::unselect(int p_idx) {
+void ItemList::deselect(int p_idx) {
ERR_FAIL_INDEX(p_idx, items.size());
if (select_mode != SELECT_MULTI) {
@@ -345,7 +345,7 @@ void ItemList::unselect(int p_idx) {
update();
}
-void ItemList::unselect_all() {
+void ItemList::deselect_all() {
if (items.size() < 1) {
return;
}
@@ -573,7 +573,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
int i = closest;
if (select_mode == SELECT_MULTI && items[i].selected && mb->get_command()) {
- unselect(i);
+ deselect(i);
emit_signal("multi_selected", i, false);
} else if (select_mode == SELECT_MULTI && mb->get_shift() && current >= 0 && current < items.size() && current != i) {
@@ -759,7 +759,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
select(current, false);
emit_signal("multi_selected", current, true);
} else if (items[current].selected) {
- unselect(current);
+ deselect(current);
emit_signal("multi_selected", current, false);
}
}
@@ -1519,8 +1519,8 @@ void ItemList::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_item_tooltip", "idx"), &ItemList::get_item_tooltip);
ClassDB::bind_method(D_METHOD("select", "idx", "single"), &ItemList::select, DEFVAL(true));
- ClassDB::bind_method(D_METHOD("unselect", "idx"), &ItemList::unselect);
- ClassDB::bind_method(D_METHOD("unselect_all"), &ItemList::unselect_all);
+ ClassDB::bind_method(D_METHOD("deselect", "idx"), &ItemList::deselect);
+ ClassDB::bind_method(D_METHOD("deselect_all"), &ItemList::deselect_all);
ClassDB::bind_method(D_METHOD("is_selected", "idx"), &ItemList::is_selected);
ClassDB::bind_method(D_METHOD("get_selected_items"), &ItemList::get_selected_items);