diff options
author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2023-01-25 02:05:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 02:05:13 +0300 |
commit | a3a42159e31db27f8ae7c1ecad6a9ed417cb05de (patch) | |
tree | 44efc6ec848bd69394ae293aeef324abd91208b7 /scene | |
parent | fab9926a958ffb5771c59a93f4416d3f3df45240 (diff) | |
parent | 0e7785333ff1c81770b043c5d0b91f963b88ed43 (diff) |
Merge pull request #70290 from aaronfranke/tree-signal
Improve clarity of Tree's activated/double-clicked signals
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/tree.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 2d985c2324..d9e6157489 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -3554,7 +3554,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) { icon_size_x = icon_region.size.width; } } - // Icon is treated as if it is outside of the rect so that double clicking on it will emit the item_double_clicked signal. + // Icon is treated as if it is outside of the rect so that double clicking on it will emit the item_icon_double_clicked signal. if (rtl) { mpos.x = get_size().width - (mpos.x + icon_size_x); } else { @@ -3562,10 +3562,10 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) { } if (rect.has_point(mpos)) { if (!edit_selected()) { - emit_signal(SNAME("item_double_clicked")); + emit_signal(SNAME("item_icon_double_clicked")); } } else { - emit_signal(SNAME("item_double_clicked")); + emit_signal(SNAME("item_icon_double_clicked")); } } pressing_for_editor = false; @@ -5257,7 +5257,7 @@ void Tree::_bind_methods() { ADD_SIGNAL(MethodInfo("item_edited")); ADD_SIGNAL(MethodInfo("custom_item_clicked", PropertyInfo(Variant::INT, "mouse_button_index"))); ADD_SIGNAL(MethodInfo("item_custom_button_pressed")); - ADD_SIGNAL(MethodInfo("item_double_clicked")); + ADD_SIGNAL(MethodInfo("item_icon_double_clicked")); ADD_SIGNAL(MethodInfo("item_collapsed", PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "TreeItem"))); ADD_SIGNAL(MethodInfo("check_propagated_to_item", PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "TreeItem"), PropertyInfo(Variant::INT, "column"))); ADD_SIGNAL(MethodInfo("button_clicked", PropertyInfo(Variant::OBJECT, "item", PROPERTY_HINT_RESOURCE_TYPE, "TreeItem"), PropertyInfo(Variant::INT, "column"), PropertyInfo(Variant::INT, "id"), PropertyInfo(Variant::INT, "mouse_button_index"))); |