diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 13:25:23 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 13:25:23 +0100 |
commit | 0a9e6e478e3183d7bf3c5cb895c706bc6275d3ea (patch) | |
tree | f0aafb3a890737c99179bda69830ecae24774770 /editor/filesystem_dock.cpp | |
parent | c461d3880fe6e0561dafd79054185e25d36a0e34 (diff) | |
parent | 435bf4e030f420c887898cd63d225e1c87447e25 (diff) | |
download | redot-engine-0a9e6e478e3183d7bf3c5cb895c706bc6275d3ea.tar.gz |
Merge pull request #71800 from akien-mga/ci-codespell-action
CI: Add official codespell action with PR annotations
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r-- | editor/filesystem_dock.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 92e3631015..cf3504fcc1 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -241,8 +241,8 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo } for (int i = 0; i < favorite_paths.size(); i++) { - String fave = favorite_paths[i]; - if (!fave.begins_with("res://")) { + String favorite = favorite_paths[i]; + if (!favorite.begins_with("res://")) { continue; } @@ -252,18 +252,18 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo String text; Ref<Texture2D> icon; Color color; - if (fave == "res://") { + if (favorite == "res://") { text = "/"; icon = folder_icon; color = folder_color; - } else if (fave.ends_with("/")) { - text = fave.substr(0, fave.length() - 1).get_file(); + } else if (favorite.ends_with("/")) { + text = favorite.substr(0, favorite.length() - 1).get_file(); icon = folder_icon; color = folder_color; } else { - text = fave.get_file(); + text = favorite.get_file(); int index; - EditorFileSystemDirectory *dir = EditorFileSystem::get_singleton()->find_file(fave, &index); + EditorFileSystemDirectory *dir = EditorFileSystem::get_singleton()->find_file(favorite, &index); if (dir) { icon = _get_tree_item_icon(dir->get_file_import_is_valid(index), dir->get_file_type(index)); } else { @@ -277,18 +277,18 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo ti->set_text(0, text); ti->set_icon(0, icon); ti->set_icon_modulate(0, color); - ti->set_tooltip_text(0, fave); + ti->set_tooltip_text(0, favorite); ti->set_selectable(0, true); - ti->set_metadata(0, fave); - if (p_select_in_favorites && fave == path) { + ti->set_metadata(0, favorite); + if (p_select_in_favorites && favorite == path) { ti->select(0); ti->set_as_cursor(0); } - if (!fave.ends_with("/")) { + if (!favorite.ends_with("/")) { Array udata; udata.push_back(tree_update_id); udata.push_back(ti); - EditorResourcePreview::get_singleton()->queue_resource_preview(fave, this, "_tree_thumbnail_done", udata); + EditorResourcePreview::get_singleton()->queue_resource_preview(favorite, this, "_tree_thumbnail_done", udata); } } } |