From 6cb4ef1c5517bd233a9b600ff2deee593d2a5af3 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Silva Dias Date: Wed, 1 May 2019 11:35:11 -0300 Subject: Fix script dialog asking for correct inheritance when not needed --- editor/script_create_dialog.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'editor') diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 0f851c526d..e24a3c6edd 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -511,17 +511,15 @@ void ScriptCreateDialog::_update_dialog() { // Is Script Valid (order from top to bottom) get_ok()->set_disabled(true); - if (!is_built_in) { - if (!is_path_valid) { - _msg_script_valid(false, TTR("Invalid path.")); - script_ok = false; - } + if (!is_built_in && !is_path_valid) { + _msg_script_valid(false, TTR("Invalid path.")); + script_ok = false; } if (has_named_classes && (is_new_script_created && !is_class_name_valid)) { _msg_script_valid(false, TTR("Invalid class name.")); script_ok = false; } - if (!is_parent_name_valid) { + if (!is_parent_name_valid && is_new_script_created) { _msg_script_valid(false, TTR("Invalid inherited parent name or path.")); script_ok = false; } -- cgit v1.2.3