diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-24 10:50:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-24 10:50:55 +0200 |
commit | 65dd1bf02392adf777ffd1891c8232615cf57a1d (patch) | |
tree | 732e32fb7a991c0e3f5d97ee666e68a3f4c72c01 /editor/dependency_editor.cpp | |
parent | 56dbfcdcbadf2c958d9656e4e3b7443b9bb11be1 (diff) | |
parent | 307427af89d4cbbcf32099f6009739f50c8bd0a0 (diff) |
Merge pull request #47665 from trollodel/tree_more_buttons_signals
Diffstat (limited to 'editor/dependency_editor.cpp')
-rw-r--r-- | editor/dependency_editor.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index 5b5e0203a3..7b73a392b4 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -49,7 +49,10 @@ void DependencyEditor::_searched(const String &p_path) { _update_file(); } -void DependencyEditor::_load_pressed(Object *p_item, int p_cell, int p_button) { +void DependencyEditor::_load_pressed(Object *p_item, int p_cell, int p_button, MouseButton p_mouse_button) { + if (p_mouse_button != MouseButton::LEFT) { + return; + } TreeItem *ti = Object::cast_to<TreeItem>(p_item); replacing = ti->get_text(1); @@ -242,7 +245,7 @@ DependencyEditor::DependencyEditor() { tree->set_column_clip_content(1, true); tree->set_column_expand_ratio(1, 1); tree->set_hide_root(true); - tree->connect("button_pressed", callable_mp(this, &DependencyEditor::_load_pressed)); + tree->connect("button_clicked", callable_mp(this, &DependencyEditor::_load_pressed)); HBoxContainer *hbc = memnew(HBoxContainer); Label *label = memnew(Label(TTR("Dependencies:"))); @@ -761,7 +764,10 @@ void OrphanResourcesDialog::_delete_confirm() { refresh(); } -void OrphanResourcesDialog::_button_pressed(Object *p_item, int p_column, int p_id) { +void OrphanResourcesDialog::_button_pressed(Object *p_item, int p_column, int p_id, MouseButton p_button) { + if (p_button != MouseButton::LEFT) { + return; + } TreeItem *ti = Object::cast_to<TreeItem>(p_item); String path = ti->get_metadata(0); @@ -796,5 +802,5 @@ OrphanResourcesDialog::OrphanResourcesDialog() { files->set_column_title(1, TTR("Owns")); files->set_hide_root(true); vbc->add_margin_child(TTR("Resources Without Explicit Ownership:"), files, true); - files->connect("button_pressed", callable_mp(this, &OrphanResourcesDialog::_button_pressed)); + files->connect("button_clicked", callable_mp(this, &OrphanResourcesDialog::_button_pressed)); } |