diff options
Diffstat (limited to 'editor/create_dialog.cpp')
-rw-r--r-- | editor/create_dialog.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index d0dfbc7c11..e8fd97fa1a 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -178,7 +178,7 @@ void CreateDialog::_update_search() { // Filter all candidate results. Vector<String> candidates; for (List<StringName>::Element *I = type_list.front(); I; I = I->next()) { - if (empty_search || search_text.is_subsequence_ofi(I->get())) { + if (empty_search || search_text.is_subsequence_ofn(I->get())) { candidates.push_back(I->get()); } } @@ -467,7 +467,7 @@ void CreateDialog::select_type(const String &p_type) { } favorite->set_disabled(false); - favorite->set_pressed(favorite_list.find(p_type) != -1); + favorite->set_pressed(favorite_list.has(p_type)); get_ok_button()->set_disabled(false); } @@ -539,12 +539,12 @@ void CreateDialog::_favorite_toggled() { String name = item->get_text(0); - if (favorite_list.find(name) == -1) { - favorite_list.push_back(name); - favorite->set_pressed(true); - } else { + if (favorite_list.has(name)) { favorite_list.erase(name); favorite->set_pressed(false); + } else { + favorite_list.push_back(name); + favorite->set_pressed(true); } _save_and_update_favorite_list(); |