Increase the page size for array/dictionary editors to 20
With smaller arrays/dictionaries, this makes it possible to view all of an array/dictionary's items on a single page. Larger values could be used, but make switching between node selections quite slow, especially on low-end CPUs. They could also be problematic with complex resource inspectors for arrays/dictionaries that contain Resources. This closes https://github.com/godotengine/godot-proposals/issues/2058.
This commit is contained in:
@@ -573,8 +573,7 @@ void EditorPropertyArray::_bind_methods() {
|
||||
|
||||
EditorPropertyArray::EditorPropertyArray() {
|
||||
object.instance();
|
||||
page_idx = 0;
|
||||
page_len = 10;
|
||||
page_len = int(EDITOR_GET("interface/inspector/max_array_dictionary_items_per_page"));
|
||||
edit = memnew(Button);
|
||||
edit->set_flat(true);
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
@@ -1069,8 +1068,7 @@ void EditorPropertyDictionary::_bind_methods() {
|
||||
|
||||
EditorPropertyDictionary::EditorPropertyDictionary() {
|
||||
object.instance();
|
||||
page_idx = 0;
|
||||
page_len = 10;
|
||||
page_len = int(EDITOR_GET("interface/inspector/max_array_dictionary_items_per_page"));
|
||||
edit = memnew(Button);
|
||||
edit->set_flat(true);
|
||||
edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
Reference in New Issue
Block a user