Browse Source

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
Andreas Haas 7 years ago
parent
commit
0de3cde6fc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/script_create_dialog.cpp

+ 1 - 1
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;
 	}