From a13b755b60ec9a8c492fefcdb6922f1e0e77a03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=B4ng=20V=C4=83n=20T=C3=ACnh?= Date: Sat, 9 Mar 2024 22:30:25 +0700 Subject: [PATCH] Fix ScriptCreateDialog to avoid selecting the file extension upon opening Fixes: #89295 This is a regression from commit 2bd714e34eb57b3fff2c9eaff0eb59ac2cb515aa --- editor/script_create_dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 6ca128138e18..cd043e165e09 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);