diff options
author | Nông Văn Tình <vannongtinh@gmail.com> | 2024-03-09 22:30:25 +0700 |
---|---|---|
committer | Nông Văn Tình <vannongtinh@gmail.com> | 2024-03-09 22:33:43 +0700 |
commit | a13b755b60ec9a8c492fefcdb6922f1e0e77a03c (patch) | |
tree | 5da4f5ae466718c8172c116116ed8f51ddebe18e | |
parent | f28964805e44a5c068ce8fd9d1e00697fcd922dc (diff) | |
download | redot-engine-a13b755b60ec9a8c492fefcdb6922f1e0e77a03c.tar.gz |
Fix ScriptCreateDialog to avoid selecting the file extension upon opening
Fixes: #89295
This is a regression from commit 2bd714e34eb57b3fff2c9eaff0eb59ac2cb515aa
-rw-r--r-- | editor/script_create_dialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 6ca128138e..cd043e165e 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -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); |