diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_themes.cpp | 2 | ||||
-rw-r--r-- | editor/filesystem_dock.cpp | 10 | ||||
-rw-r--r-- | editor/filesystem_dock.h | 1 |
3 files changed, 10 insertions, 3 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 335e3fcd29..0869f6ce77 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -204,7 +204,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme = } // generate thumb files with the given thumb size - bool force_filter = !(p_thumb_size == 64 && p_thumb_size == 32); // we don't need filter with original resolution + bool force_filter = p_thumb_size != 64 && p_thumb_size != 32; // we don't need filter with original resolution if (p_thumb_size >= 64) { float scale = (float)p_thumb_size / 64.0 * EDSCALE; for (int i = 0; i < editor_bg_thumbs_count; i++) { diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 7462783c11..5a1383be6d 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -2125,6 +2125,10 @@ void FileSystemDock::_tree_rmb_select(const Vector2 &p_pos) { } } +void FileSystemDock::_tree_empty_selected() { + tree->deselect_all(); +} + void FileSystemDock::_file_list_rmb_select(int p_item, const Vector2 &p_pos) { // Right click is pressed in the file list Vector<String> paths; @@ -2308,9 +2312,10 @@ void FileSystemDock::_bind_methods() { ClassDB::bind_method(D_METHOD("_toggle_split_mode"), &FileSystemDock::_toggle_split_mode); ClassDB::bind_method(D_METHOD("_tree_rmb_option", "option"), &FileSystemDock::_tree_rmb_option); - ClassDB::bind_method(D_METHOD("_file_list_rmb_option", "option"), &FileSystemDock::_file_list_rmb_option); - ClassDB::bind_method(D_METHOD("_tree_rmb_select"), &FileSystemDock::_tree_rmb_select); + ClassDB::bind_method(D_METHOD("_tree_empty_selected"), &FileSystemDock::_tree_empty_selected); + + ClassDB::bind_method(D_METHOD("_file_list_rmb_option", "option"), &FileSystemDock::_file_list_rmb_option); ClassDB::bind_method(D_METHOD("_file_list_rmb_select"), &FileSystemDock::_file_list_rmb_select); ClassDB::bind_method(D_METHOD("_file_list_rmb_pressed"), &FileSystemDock::_file_list_rmb_pressed); @@ -2445,6 +2450,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { tree->connect("item_activated", this, "_tree_activate_file"); tree->connect("multi_selected", this, "_tree_multi_selected"); tree->connect("item_rmb_selected", this, "_tree_rmb_select"); + tree->connect("nothing_selected", this, "_tree_empty_selected"); tree->connect("gui_input", this, "_tree_gui_input"); file_list_vb = memnew(VBoxContainer); diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index f6de712d17..8b27938c8a 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -237,6 +237,7 @@ private: void _tree_rmb_select(const Vector2 &p_pos); void _file_list_rmb_select(int p_item, const Vector2 &p_pos); void _file_list_rmb_pressed(const Vector2 &p_pos); + void _tree_empty_selected(); struct FileInfo { String name; |