mirror of
https://github.com/godotengine/godot.git
synced 2024-11-29 07:32:20 +00:00
Fix custom built-in script names
This commit is contained in:
parent
93808ce6cb
commit
6eb1c92cea
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user