Merge pull request #24909 from xDGameStudios/array_static_types

Disallow changing array element types, when using hint (inspector fix)
This commit is contained in:
Rémi Verschelde 2019-01-15 13:22:43 +01:00 committed by GitHub
commit fadaeb06c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -360,10 +360,14 @@ void EditorPropertyArray::update_property() {
vbox->add_child(hb);
hb->add_child(prop);
prop->set_h_size_flags(SIZE_EXPAND_FILL);
Button *edit = memnew(Button);
edit->set_icon(get_icon("Edit", "EditorIcons"));
hb->add_child(edit);
edit->connect("pressed", this, "_change_type", varray(edit, i + offset));
if (subtype == Variant::NIL) {
Button *edit = memnew(Button);
edit->set_icon(get_icon("Edit", "EditorIcons"));
hb->add_child(edit);
edit->connect("pressed", this, "_change_type", varray(edit, i + offset));
}
} else {
vbox->add_child(prop);
}