summaryrefslogtreecommitdiff
path: root/editor/script_create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/script_create_dialog.cpp')
-rw-r--r--editor/script_create_dialog.cpp2
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;
}