Skip to content

Commit

Permalink
Merge pull request #55728 from KoBeWi/is_built_in()_should've_been_ba…
Browse files Browse the repository at this point in the history
…ckported
  • Loading branch information
akien-mga authored Dec 8, 2021
2 parents 93808ce + 6eb1c92 commit eb309b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion editor/plugins/script_text_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ String ScriptTextEditor::get_name() {
if (name.empty()) {
// This appears for newly created built-in scripts before saving the scene.
name = TTR("[unsaved]");
} else if (script->get_path().find("local://") == -1 && script->get_path().find("::") == -1) {
} else if (script->get_path().find("local://") == -1 || script->get_path().find("::") == -1) {
const String &script_name = script->get_name();
if (script_name != "") {
// If the built-in script has a custom resource name defined,
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/text_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ String TextEditor::get_name() {
if (name.empty()) {
// This appears for newly created built-in text_files before saving the scene.
name = TTR("[unsaved]");
} else if (text_file->get_path().find("local://") == -1 && text_file->get_path().find("::") == -1) {
} else if (text_file->get_path().find("local://") == -1 || text_file->get_path().find("::") == -1) {
const String &text_file_name = text_file->get_name();
if (text_file_name != "") {
// If the built-in text_file has a custom resource name defined,
Expand Down
2 changes: 1 addition & 1 deletion modules/visual_script/visual_script_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,7 @@ String VisualScriptEditor::get_name() {
if (name.empty()) {
// This appears for newly created built-in scripts before saving the scene.
name = TTR("[unsaved]");
} else if (script->get_path().find("local://") == -1 && script->get_path().find("::") == -1) {
} else if (script->get_path().find("local://") == -1 || script->get_path().find("::") == -1) {
const String &script_name = script->get_name();
if (script_name != "") {
// If the built-in script has a custom resource name defined,
Expand Down

0 comments on commit eb309b7

Please sign in to comment.