summaryrefslogtreecommitdiff
path: root/editor/filesystem_dock.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-06 10:46:47 +0200
committerGitHub <noreply@github.com>2022-05-06 10:46:47 +0200
commit61517b6d3994f419580a89f5ba3270681c442dd6 (patch)
treed6c82f5848da231ae6c5338f2ffe2b13535a4687 /editor/filesystem_dock.cpp
parentf4ece7e7361ae5e23a80743c9184ac584ad2ce76 (diff)
parentaef3b5681df388358d13bbe53bbafcbf2f905691 (diff)
Merge pull request #59720 from Vitika9/itemlist-signals
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r--editor/filesystem_dock.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 41356c1d56..47c016803c 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -2637,7 +2637,11 @@ void FileSystemDock::_tree_empty_selected() {
tree->deselect_all();
}
-void FileSystemDock::_file_list_rmb_select(int p_item, const Vector2 &p_pos) {
+void FileSystemDock::_file_list_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index) {
+ if (p_mouse_button_index != MouseButton::RIGHT) {
+ return;
+ }
+
// Right click is pressed in the file list.
Vector<String> paths;
for (int i = 0; i < files->get_item_count(); i++) {
@@ -3128,7 +3132,7 @@ FileSystemDock::FileSystemDock() {
files->set_v_size_flags(SIZE_EXPAND_FILL);
files->set_select_mode(ItemList::SELECT_MULTI);
files->set_drag_forwarding(this);
- files->connect("item_rmb_selected", callable_mp(this, &FileSystemDock::_file_list_rmb_select));
+ files->connect("item_clicked", callable_mp(this, &FileSystemDock::_file_list_rmb_clicked));
files->connect("gui_input", callable_mp(this, &FileSystemDock::_file_list_gui_input));
files->connect("multi_selected", callable_mp(this, &FileSystemDock::_file_multi_selected));
files->connect("rmb_clicked", callable_mp(this, &FileSystemDock::_file_list_rmb_pressed));