summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Buring <ricardo.buring@gmail.com>2022-08-04 16:21:09 +0200
committerRicardo Buring <ricardo.buring@gmail.com>2022-08-04 16:21:09 +0200
commit4a59188898284e583e66c3a5c9cd3969730ad2d4 (patch)
treee8ffa2b782f86197ab90acf341002fb5004cc030
parent426240f18a1326ef31bbb45c65e6f556658d2519 (diff)
Fixup array property inspector
-rw-r--r--editor/editor_inspector.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 13506718ec..d11c659b98 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -3016,7 +3016,6 @@ void EditorInspector::update_tree() {
Vector<String> class_name_components = String(p.class_name).split(",");
- array_element_prefix = class_name_components[1];
int page_size = 5;
bool movable = true;
bool numbered = false;
@@ -3052,8 +3051,8 @@ void EditorInspector::update_tree() {
editor_inspector_array->set_undo_redo(undo_redo);
} else if (p.type == Variant::INT) {
// Setup the array to use the count property and built-in functions to create/move/delete elements.
-
- if (class_name_components.size() > 2) {
+ if (class_name_components.size() >= 2) {
+ array_element_prefix = class_name_components[1];
editor_inspector_array = memnew(EditorInspectorArray);
int page = per_array_page.has(array_element_prefix) ? per_array_page[array_element_prefix] : 0;