summaryrefslogtreecommitdiff
path: root/editor/dependency_editor.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-06 10:46:47 +0200
committerGitHub <noreply@github.com>2022-05-06 10:46:47 +0200
commit61517b6d3994f419580a89f5ba3270681c442dd6 (patch)
treed6c82f5848da231ae6c5338f2ffe2b13535a4687 /editor/dependency_editor.cpp
parentf4ece7e7361ae5e23a80743c9184ac584ad2ce76 (diff)
parentaef3b5681df388358d13bbe53bbafcbf2f905691 (diff)
Merge pull request #59720 from Vitika9/itemlist-signals
Diffstat (limited to 'editor/dependency_editor.cpp')
-rw-r--r--editor/dependency_editor.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 35f40a159a..54655f53b5 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -271,7 +271,11 @@ DependencyEditor::DependencyEditor() {
}
/////////////////////////////////////
-void DependencyEditorOwners::_list_rmb_select(int p_item, const Vector2 &p_pos) {
+void DependencyEditorOwners::_list_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index) {
+ if (p_mouse_button_index != MouseButton::RIGHT) {
+ return;
+ }
+
file_options->clear();
file_options->reset_size();
if (p_item >= 0) {
@@ -352,7 +356,7 @@ DependencyEditorOwners::DependencyEditorOwners() {
owners = memnew(ItemList);
owners->set_select_mode(ItemList::SELECT_SINGLE);
- owners->connect("item_rmb_selected", callable_mp(this, &DependencyEditorOwners::_list_rmb_select));
+ owners->connect("item_clicked", callable_mp(this, &DependencyEditorOwners::_list_rmb_clicked));
owners->connect("item_activated", callable_mp(this, &DependencyEditorOwners::_select_file));
owners->set_allow_rmb_select(true);
add_child(owners);