1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

ScriptCreateDialog: Fix loading scripts with named classes.

We only need to validate the class name when creating a new script, existing scripts already have one.

Fixes #14643
Supersedes/Closes #14684
This commit is contained in:
Andreas Haas
2017-12-15 19:40:08 +01:00
parent 19af42b353
commit 0de3cde6fc

View File

@@ -459,7 +459,7 @@ void ScriptCreateDialog::_update_dialog() {
script_ok = false; script_ok = false;
} }
} }
if (has_named_classes && (!is_class_name_valid)) { if (has_named_classes && (is_new_script_created && !is_class_name_valid)) {
_msg_script_valid(false, TTR("Invalid class name")); _msg_script_valid(false, TTR("Invalid class name"));
script_ok = false; script_ok = false;
} }