Use (r)find_char instead of (r)find for single characters
This commit is contained in:
parent
5efd124ca1
commit
68f638cf02
70 changed files with 169 additions and 169 deletions
|
|
@ -156,7 +156,7 @@ void EditorFileDialog::popup_file_dialog() {
|
|||
}
|
||||
|
||||
void EditorFileDialog::_focus_file_text() {
|
||||
int lp = file->get_text().rfind(".");
|
||||
int lp = file->get_text().rfind_char('.');
|
||||
if (lp != -1) {
|
||||
file->select(0, lp);
|
||||
file->grab_focus();
|
||||
|
|
@ -1263,7 +1263,7 @@ void EditorFileDialog::set_current_path(const String &p_path) {
|
|||
if (!p_path.size()) {
|
||||
return;
|
||||
}
|
||||
int pos = MAX(p_path.rfind("/"), p_path.rfind("\\"));
|
||||
int pos = MAX(p_path.rfind_char('/'), p_path.rfind_char('\\'));
|
||||
if (pos == -1) {
|
||||
set_current_file(p_path);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue