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/filesystem_dock.cpp | |
parent | 56dbfcdcbadf2c958d9656e4e3b7443b9bb11be1 (diff) | |
parent | 307427af89d4cbbcf32099f6009739f50c8bd0a0 (diff) |
Merge pull request #47665 from trollodel/tree_more_buttons_signals
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r-- | editor/filesystem_dock.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 8a995eaa8f..aaff892c2a 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -2592,7 +2592,10 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str } } -void FileSystemDock::_tree_rmb_select(const Vector2 &p_pos) { +void FileSystemDock::_tree_rmb_select(const Vector2 &p_pos, MouseButton p_button) { + if (p_button != MouseButton::RIGHT) { + return; + } // Right click is pressed in the tree. Vector<String> paths = _tree_get_selected(false); @@ -2615,7 +2618,10 @@ void FileSystemDock::_tree_rmb_select(const Vector2 &p_pos) { } } -void FileSystemDock::_tree_rmb_empty(const Vector2 &p_pos) { +void FileSystemDock::_tree_empty_click(const Vector2 &p_pos, MouseButton p_button) { + if (p_button != MouseButton::RIGHT) { + return; + } // Right click is pressed in the empty space of the tree. path = "res://"; tree_popup->clear(); @@ -3106,8 +3112,8 @@ FileSystemDock::FileSystemDock() { tree->connect("item_activated", callable_mp(this, &FileSystemDock::_tree_activate_file)); tree->connect("multi_selected", callable_mp(this, &FileSystemDock::_tree_multi_selected)); - tree->connect("item_rmb_selected", callable_mp(this, &FileSystemDock::_tree_rmb_select)); - tree->connect("empty_rmb", callable_mp(this, &FileSystemDock::_tree_rmb_empty)); + tree->connect("item_mouse_selected", callable_mp(this, &FileSystemDock::_tree_rmb_select)); + tree->connect("empty_clicked", callable_mp(this, &FileSystemDock::_tree_empty_click)); tree->connect("nothing_selected", callable_mp(this, &FileSystemDock::_tree_empty_selected)); tree->connect("gui_input", callable_mp(this, &FileSystemDock::_tree_gui_input)); tree->connect("mouse_exited", callable_mp(this, &FileSystemDock::_tree_mouse_exited)); |