From 0de3cde6fc9f7d02295d12a823261340efa7f841 Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Fri, 15 Dec 2017 19:40:08 +0100 Subject: [PATCH] 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 --- editor/script_create_dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 3cab14b0c4e..f99a2eafdd2 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; }