diff options
author | Michael Alexsander <michaelalexsander@protonmail.com> | 2020-02-02 14:08:22 -0300 |
---|---|---|
committer | Michael Alexsander <michaelalexsander@protonmail.com> | 2020-02-03 13:07:17 -0300 |
commit | f7374cef8459ed34707cc3db2a9b077162e821c0 (patch) | |
tree | 22ff5eabca0dfbdd5fe5907feb423893f65db9cc | |
parent | e5cb4f03c554a48c6d0b400ad53d4fad933d4dc7 (diff) |
Fix built-in script creation loading existing scripts by mistake
-rw-r--r-- | editor/script_create_dialog.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index a982724d4c..c4627e6627 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -84,7 +84,9 @@ void ScriptCreateDialog::_path_hbox_sorted() { int filename_start_pos = initial_bp.find_last("/") + 1; int filename_end_pos = initial_bp.length(); - file_path->select(filename_start_pos, filename_end_pos); + if (!is_built_in) { + file_path->select(filename_start_pos, filename_end_pos); + } // First set cursor to the end of line to scroll LineEdit view // to the right and then set the actual cursor position. @@ -575,6 +577,10 @@ void ScriptCreateDialog::_browse_class_in_tree() { void ScriptCreateDialog::_path_changed(const String &p_path) { + if (is_built_in) { + return; + } + is_path_valid = false; is_new_script_created = true; |