1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Disallow Callable, Signal and RID in export arrays

This commit is contained in:
kobewi
2022-05-05 17:04:50 +02:00
parent 88a440826a
commit e7da3ce96e
2 changed files with 15 additions and 5 deletions

View File

@@ -515,12 +515,12 @@ void ProjectSettingsEditor::_update_theme() {
type_box->clear();
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
// There's no point in adding Nil types, and Object types
// can't be serialized correctly in the project settings.
if (i != Variant::NIL && i != Variant::OBJECT) {
String type = Variant::get_type_name(Variant::Type(i));
type_box->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i);
if (i == Variant::NIL || i == Variant::OBJECT || i == Variant::CALLABLE || i == Variant::SIGNAL || i == Variant::RID) {
// These types can't be serialized properly, so skip them.
continue;
}
String type = Variant::get_type_name(Variant::Type(i));
type_box->add_icon_item(get_theme_icon(type, SNAME("EditorIcons")), type, i);
}
}