Browse Source

Replace magic num in editor_properties_array_dict

Quick update to editor/editor_properties_array_dict max size.
Currently, an array in the EditorInspector won't display a number higher than 1,000,000.
In place of the current magic number this sets the max to be the INT32_MAX.
This eludes the magic number in place and is sufficiently large.

Resolves #77190
Jackson Thomas Browne 2 years ago
parent
commit
4fb7aac651
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/editor_properties_array_dict.cpp

+ 1 - 1
editor/editor_properties_array_dict.cpp

@@ -311,7 +311,7 @@ void EditorPropertyArray::update_property() {
 
 			size_slider = memnew(EditorSpinSlider);
 			size_slider->set_step(1);
-			size_slider->set_max(1000000);
+			size_slider->set_max(INT32_MAX);
 			size_slider->set_h_size_flags(SIZE_EXPAND_FILL);
 			size_slider->set_read_only(is_read_only());
 			size_slider->connect("value_changed", callable_mp(this, &EditorPropertyArray::_length_changed));