Browse Source

Add static types to arrays (inspector fix)

xDGameStudios 6 năm trước cách đây
mục cha
commit
f9788f75e5
1 tập tin đã thay đổi với 8 bổ sung4 xóa
  1. 8 4
      editor/editor_properties_array_dict.cpp

+ 8 - 4
editor/editor_properties_array_dict.cpp

@@ -358,10 +358,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);
 			}