summaryrefslogtreecommitdiffstats
path: root/editor/filesystem_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r--editor/filesystem_dock.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index ef77e5340b..4c7c723dd5 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -261,7 +261,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
if (p_unfold_path && current_path.begins_with(lpath) && current_path != lpath) {
subdirectory_item->set_collapsed(false);
} else {
- subdirectory_item->set_collapsed(uncollapsed_paths.find(lpath) < 0);
+ subdirectory_item->set_collapsed(!uncollapsed_paths.has(lpath));
}
if (!searched_tokens.is_empty() && _matches_all_search_tokens(dname)) {
parent_should_expand = true;
@@ -407,7 +407,7 @@ void FileSystemDock::_update_tree(const Vector<String> &p_uncollapsed_paths, boo
favorites_item->set_icon(0, get_editor_theme_icon(SNAME("Favorites")));
favorites_item->set_text(0, TTR("Favorites:"));
favorites_item->set_metadata(0, "Favorites");
- favorites_item->set_collapsed(p_uncollapsed_paths.find("Favorites") < 0);
+ favorites_item->set_collapsed(!p_uncollapsed_paths.has("Favorites"));
Vector<String> favorite_paths = EditorSettings::get_singleton()->get_favorites();
@@ -2300,7 +2300,7 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
TreeItem *selected = tree->get_root();
selected = tree->get_next_selected(selected);
while (selected) {
- if (p_selected.find(selected->get_metadata(0)) >= 0) {
+ if (p_selected.has(selected->get_metadata(0))) {
selected->set_collapsed(false);
}
selected = tree->get_next_selected(selected);