Repository: godotengine/godot
File: editor/scene/gui/font_config_plugin.cpp (C++)

Code before:
				property_vbox->get_child(i)->queue_free();
			}
		}

		int size = supported.size();

		int max_page = MAX(0, size - 1) / page_length;
		page_index = MIN(page_index, max_page);

		paginator->update(page_index, max_page);
		paginator->set_visible(max_page > 0);

		int offset = page_index * page_length;

		int amount = MIN(size - offset, page_length);

		dict = dict.duplicate();
		object->set_dict(dict);
		object->set_defaults(supported);

		for (int i = 0; i < amount; i++) {
			int name_tag = supported.get_key_at_index(i);
			Vector3i range = supported.get_value_at_index(i);

			EditorPropertyInteger *prop = memnew(EditorPropertyInteger);
			prop->setup(range.x, range.y, 0, false, true, false, false);
			prop->set_object_and_property(object.ptr(), "keys/" + itos(name_tag));

			String name = TS->tag_to_name(name_tag);
			String name_cap;
			{
				String aux = name.replace_char('_', ' ').strip_edges();
				for (int j = 0; j < aux.get_slice_count(" "); j++) {
					String slice = aux.get_slicec(' ', j);
					if (slice.length() > 0) {
						slice[0] = String::char_uppercase(slice[0]);
						if (i > 0) {
							name_cap += " ";
						}
						name_cap += slice;
					}
				}
			}
			prop->set_label(name_cap);
			prop->set_tooltip_text(name);
			prop->set_selectable(false);

			prop->connect("property_changed", callable_mp(this, &EditorPropertyOTVariation::_property_changed));
			prop->connect("object_id_selected", callable_mp(this, &EditorPropertyOTVariation::_object_id_selected));

			property_vbox->add_child(prop);

Review comment (bug):
Step `0` seems not supported for integer properties.
 I didn't test this particular case, but it's likely broken.

Code after:
				property_vbox->get_child(i)->queue_free();
			}
		}

		int size = supported.size();

		int max_page = MAX(0, size - 1) / page_length;
		page_index = MIN(page_index, max_page);

		paginator->update(page_index, max_page);
		paginator->set_visible(max_page > 0);

		int offset = page_index * page_length;

		int amount = MIN(size - offset, page_length);

		dict = dict.duplicate();
		object->set_dict(dict);
		object->set_defaults(supported);

		for (int i = 0; i < amount; i++) {
			int name_tag = supported.get_key_at_index(i);
			Vector3i range = supported.get_value_at_index(i);

			EditorPropertyInteger *prop = memnew(EditorPropertyInteger);
			prop->setup(range.x, range.y, 1, false, true, false, false);
			prop->set_object_and_property(object.ptr(), "keys/" + itos(name_tag));

			String name = TS->tag_to_name(name_tag);
			String name_cap;
			{
				String aux = name.replace_char('_', ' ').strip_edges();
				for (int j = 0; j < aux.get_slice_count(" "); j++) {
					String slice = aux.get_slicec(' ', j);
					if (slice.length() > 0) {
						slice[0] = String::char_uppercase(slice[0]);
						if (i > 0) {
							name_cap += " ";
						}
						name_cap += slice;
					}
				}
			}
			prop->set_label(name_cap);
			prop->set_tooltip_text(name);
			prop->set_selectable(false);

			prop->connect("property_changed", callable_mp(this, &EditorPropertyOTVariation::_property_changed));
			prop->connect("object_id_selected", callable_mp(this, &EditorPropertyOTVariation::_object_id_selected));

			property_vbox->add_child(prop);