summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2019-05-01 11:35:11 -0300
committerMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2019-05-02 12:04:05 -0300
commit6cb4ef1c5517bd233a9b600ff2deee593d2a5af3 (patch)
tree412fa135f1efa3b70bd9523cb40bbee6487cbbf5 /editor
parent0eb924a425281dfae4672ec114dc42b4067205ec (diff)
Fix script dialog asking for correct inheritance when not needed
Diffstat (limited to 'editor')
-rw-r--r--editor/script_create_dialog.cpp10
1 files changed, 4 insertions, 6 deletions
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;
}