summaryrefslogtreecommitdiff
path: root/editor/plugins/resource_preloader_editor_plugin.cpp
diff options
context:
space:
mode:
authortrollodel <33117082+trollodel@users.noreply.github.com>2021-09-18 09:33:18 +0200
committertrollodel <33117082+trollodel@users.noreply.github.com>2022-05-21 17:16:52 +0200
commit307427af89d4cbbcf32099f6009739f50c8bd0a0 (patch)
tree73915e75837b66834834b1e124687258f886b05e /editor/plugins/resource_preloader_editor_plugin.cpp
parent4173a4735eb1690132d30430f88fb7d2681c5727 (diff)
Add the button pressed to some signals in Tree
Diffstat (limited to 'editor/plugins/resource_preloader_editor_plugin.cpp')
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index 71d31aa1d7..16e874d7e2 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -213,7 +213,11 @@ void ResourcePreloaderEditor::_update_library() {
//player->add_resource("default",resource);
}
-void ResourcePreloaderEditor::_cell_button_pressed(Object *p_item, int p_column, int p_id) {
+void ResourcePreloaderEditor::_cell_button_pressed(Object *p_item, int p_column, int p_id, MouseButton p_button) {
+ if (p_button != MouseButton::LEFT) {
+ return;
+ }
+
TreeItem *item = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!item);
@@ -359,7 +363,7 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
add_child(file);
tree = memnew(Tree);
- tree->connect("button_pressed", callable_mp(this, &ResourcePreloaderEditor::_cell_button_pressed));
+ tree->connect("button_clicked", callable_mp(this, &ResourcePreloaderEditor::_cell_button_pressed));
tree->set_columns(2);
tree->set_column_expand_ratio(0, 2);
tree->set_column_clip_content(0, true);