summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorAleksey Smirnov <debugger94@gmail.com>2022-05-09 21:17:04 +0300
committerAleksey Smirnov <debugger94@gmail.com>2022-05-10 13:26:16 +0300
commit81520be31d8263f4db45fe8099b9cdfb062e81a7 (patch)
treec44322192f818fc15b219fc2f791f79396519797 /editor
parentccb583be091d3baf55365235cb35d4487ea3e911 (diff)
Cleanups after changes in ItemList signals
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_file_dialog.cpp2
-rw-r--r--editor/editor_file_dialog.h2
-rw-r--r--editor/filesystem_dock.cpp12
-rw-r--r--editor/filesystem_dock.h4
4 files changed, 12 insertions, 8 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 84d656fc20..13084e2aab 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -529,7 +529,7 @@ void EditorFileDialog::_multi_selected(int p_item, bool p_selected) {
get_ok_button()->set_disabled(_is_open_should_be_disabled());
}
-void EditorFileDialog::_items_clear_selection(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index) {
+void EditorFileDialog::_items_clear_selection(const Vector2 &p_pos, MouseButton p_mouse_button_index) {
if (p_mouse_button_index != MouseButton::LEFT) {
return;
}
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index d9a58a5b7f..5f2e29b690 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -165,7 +165,7 @@ private:
void _item_selected(int p_item);
void _multi_selected(int p_item, bool p_selected);
- void _items_clear_selection(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index);
+ void _items_clear_selection(const Vector2 &p_pos, MouseButton p_mouse_button_index);
void _item_dc_selected(int p_item);
void _item_list_item_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index);
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 47c016803c..aae8cf25b6 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -2637,7 +2637,7 @@ void FileSystemDock::_tree_empty_selected() {
tree->deselect_all();
}
-void FileSystemDock::_file_list_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index) {
+void FileSystemDock::_file_list_item_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index) {
if (p_mouse_button_index != MouseButton::RIGHT) {
return;
}
@@ -2665,7 +2665,11 @@ void FileSystemDock::_file_list_rmb_clicked(int p_item, const Vector2 &p_pos, Mo
}
}
-void FileSystemDock::_file_list_rmb_pressed(const Vector2 &p_pos) {
+void FileSystemDock::_file_list_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index) {
+ if (p_mouse_button_index != MouseButton::RIGHT) {
+ return;
+ }
+
// Right click on empty space for file list.
if (searched_string.length() > 0) {
return;
@@ -3132,10 +3136,10 @@ 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_clicked", callable_mp(this, &FileSystemDock::_file_list_rmb_clicked));
+ files->connect("item_clicked", callable_mp(this, &FileSystemDock::_file_list_item_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));
+ files->connect("empty_clicked", callable_mp(this, &FileSystemDock::_file_list_empty_clicked));
files->set_custom_minimum_size(Size2(0, 15 * EDSCALE));
files->set_allow_rmb_select(true);
file_list_vb->add_child(files);
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index f6c4e271bf..fc24b3e9fd 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -260,8 +260,8 @@ private:
void _file_and_folders_fill_popup(PopupMenu *p_popup, Vector<String> p_paths, bool p_display_path_dependent_options = true);
void _tree_rmb_select(const Vector2 &p_pos);
void _tree_rmb_empty(const Vector2 &p_pos);
- void _file_list_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index);
- void _file_list_rmb_pressed(const Vector2 &p_pos);
+ void _file_list_item_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index);
+ void _file_list_empty_clicked(const Vector2 &p_pos, MouseButton p_mouse_button_index);
void _tree_empty_selected();
struct FileInfo {