diff options
author | trollodel <33117082+trollodel@users.noreply.github.com> | 2021-09-18 09:33:18 +0200 |
---|---|---|
committer | trollodel <33117082+trollodel@users.noreply.github.com> | 2022-05-21 17:16:52 +0200 |
commit | 307427af89d4cbbcf32099f6009739f50c8bd0a0 (patch) | |
tree | 73915e75837b66834834b1e124687258f886b05e /editor/debugger/editor_debugger_tree.cpp | |
parent | 4173a4735eb1690132d30430f88fb7d2681c5727 (diff) |
Add the button pressed to some signals in Tree
Diffstat (limited to 'editor/debugger/editor_debugger_tree.cpp')
-rw-r--r-- | editor/debugger/editor_debugger_tree.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp index 3a65d015d5..023204b74a 100644 --- a/editor/debugger/editor_debugger_tree.cpp +++ b/editor/debugger/editor_debugger_tree.cpp @@ -57,7 +57,7 @@ void EditorDebuggerTree::_notification(int p_what) { case NOTIFICATION_POSTINITIALIZE: { connect("cell_selected", callable_mp(this, &EditorDebuggerTree::_scene_tree_selected)); connect("item_collapsed", callable_mp(this, &EditorDebuggerTree::_scene_tree_folded)); - connect("item_rmb_selected", callable_mp(this, &EditorDebuggerTree::_scene_tree_rmb_selected)); + connect("item_mouse_selected", callable_mp(this, &EditorDebuggerTree::_scene_tree_rmb_selected)); } break; } } @@ -100,7 +100,11 @@ void EditorDebuggerTree::_scene_tree_folded(Object *p_obj) { } } -void EditorDebuggerTree::_scene_tree_rmb_selected(const Vector2 &p_position) { +void EditorDebuggerTree::_scene_tree_rmb_selected(const Vector2 &p_position, MouseButton p_button) { + if (p_button != MouseButton::RIGHT) { + return; + } + TreeItem *item = get_item_at_position(p_position); if (!item) { return; |