diff options
author | Stijn Hinlopen <f.a.hinlopen@gmail.com> | 2020-07-03 15:26:22 +0200 |
---|---|---|
committer | Stijn Hinlopen <f.a.hinlopen@gmail.com> | 2020-07-03 15:26:22 +0200 |
commit | 929b98d24b53789b3e3fbbae90aed0fe0e72b409 (patch) | |
tree | 89156a4e626da2bef5305bee55d785f5e77aec46 /editor/script_create_dialog.cpp | |
parent | fd5b6e1db24facfbb6d5e9175b8e512c25fbde1d (diff) | |
download | redot-engine-929b98d24b53789b3e3fbbae90aed0fe0e72b409.tar.gz |
Remove String::find_last (same as rfind)
Diffstat (limited to 'editor/script_create_dialog.cpp')
-rw-r--r-- | editor/script_create_dialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index ae5229b628..40e0582046 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -78,7 +78,7 @@ void ScriptCreateDialog::_notification(int p_what) { void ScriptCreateDialog::_path_hbox_sorted() { if (is_visible()) { - int filename_start_pos = initial_bp.find_last("/") + 1; + int filename_start_pos = initial_bp.rfind("/") + 1; int filename_end_pos = initial_bp.length(); if (!is_built_in) { @@ -553,7 +553,7 @@ void ScriptCreateDialog::_file_selected(const String &p_file) { _path_changed(p); String filename = p.get_file().get_basename(); - int select_start = p.find_last(filename); + int select_start = p.rfind(filename); file_path->select(select_start, select_start + filename.length()); file_path->set_cursor_position(select_start + filename.length()); file_path->grab_focus(); |