diff options
author | Andreas Haas <liu.gam3@gmail.com> | 2017-12-15 19:40:08 +0100 |
---|---|---|
committer | Andreas Haas <liu.gam3@gmail.com> | 2017-12-15 19:40:36 +0100 |
commit | 0de3cde6fc9f7d02295d12a823261340efa7f841 (patch) | |
tree | 307ccbeff800369aa837c7e981b5cd8d8ca5f056 | |
parent | 19af42b35312f41de025728c4003045484cc1542 (diff) |
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
-rw-r--r-- | editor/script_create_dialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 3cab14b0c4..f99a2eafdd 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -459,7 +459,7 @@ void ScriptCreateDialog::_update_dialog() { 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")); script_ok = false; } |