Просмотр исходного кода

Merge pull request #89315 from nongvantinh/fix-regression-89295

Fix ScriptCreateDialog so it does not select the file extension when it's opened
Rémi Verschelde 1 год назад
Родитель
Сommit
0322436a93
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      editor/script_create_dialog.cpp

+ 1 - 1
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);