summaryrefslogtreecommitdiffstats
path: root/editor/plugins/replication_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/replication_editor_plugin.cpp')
-rw-r--r--editor/plugins/replication_editor_plugin.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/plugins/replication_editor_plugin.cpp b/editor/plugins/replication_editor_plugin.cpp
index 2a7b3c7a55..5340f7561e 100644
--- a/editor/plugins/replication_editor_plugin.cpp
+++ b/editor/plugins/replication_editor_plugin.cpp
@@ -81,7 +81,7 @@ ReplicationEditor::ReplicationEditor() {
tree->set_column_expand(2, false);
tree->set_column_expand(3, false);
tree->create_item();
- tree->connect("button_pressed", callable_mp(this, &ReplicationEditor::_tree_button_pressed));
+ tree->connect("button_clicked", callable_mp(this, &ReplicationEditor::_tree_button_pressed));
tree->connect("item_edited", callable_mp(this, &ReplicationEditor::_tree_item_edited));
tree->set_v_size_flags(SIZE_EXPAND_FILL);
vb->add_child(tree);
@@ -167,7 +167,11 @@ void ReplicationEditor::_tree_item_edited() {
undo_redo->commit_action();
}
-void ReplicationEditor::_tree_button_pressed(Object *p_item, int p_column, int p_id) {
+void ReplicationEditor::_tree_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);
if (!ti) {
return;