Skip to content

Commit

Permalink
Fix ScriptCreateDialog to avoid selecting the file extension upon ope…
Browse files Browse the repository at this point in the history
…ning

Fixes: #89295

This is a regression from commit 2bd714e
  • Loading branch information
nongvantinh committed Mar 9, 2024
1 parent f289648 commit a13b755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/script_create_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void ScriptCreateDialog::_notification(int p_what) {
void ScriptCreateDialog::_path_hbox_sorted() {
if (is_visible()) {
int filename_start_pos = file_path->get_text().rfind("/") + 1;
int filename_end_pos = file_path->get_text().length();
int filename_end_pos = file_path->get_text().get_basename().length();

if (!is_built_in) {
file_path->select(filename_start_pos, filename_end_pos);
Expand Down

0 comments on commit a13b755

Please sign in to comment.