Repository: godotengine/godot
File: editor/inspector/editor_inspector.cpp (C++)

Code before:
			LocalVector<String> properties;

			_collect_properties(properties);
			EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();

			if (const MultiNodeEdit *multi_node_edit = cast_to<MultiNodeEdit>(object)) {
				const Node *es = EditorNode::get_singleton()->get_edited_scene();
				const String action_name = vformat(TTR("Set group %s on %d nodes"), group_name, multi_node_edit->get_node_count());
				ur->create_action(action_name);

				for (int i = 0; i < multi_node_edit->get_node_count(); i++) {
					const NodePath E = multi_node_edit->get_node(i);
					Node *n = es->get_node(E);
					if (!n) {
						continue;
					}

					for (const String &property_name : properties) {
						ur->add_do_property(n, property_name, clipboard[property_name]);
						ur->add_undo_property(n, property_name, n->get(property_name));
					}
				}

				ur->commit_action();
			} else {
				const String action_name = vformat(TTR("Set group %s on node %s"), group_name, object->get("name"));
				ur->create_action(action_name);

				for (const String &property_name : properties) {
					ur->add_do_property(object, property_name, clipboard[property_name]);
					ur->add_undo_property(object, property_name, object->get(property_name));
				}

				ur->commit_action();
			}

		} break;
	}
}

void EditorInspectorSection::_bind_methods() {
	ClassDB::bind_method(D_METHOD("setup", "section", "label", "object", "bg_color", "foldable", "indent_depth", "level"), &EditorInspectorSection::setup, DEFVAL(0), DEFVAL(1));
	ClassDB::bind_method(D_METHOD("get_vbox"), &EditorInspectorSection::get_vbox);
	ClassDB::bind_method(D_METHOD("unfold"), &EditorInspectorSection::unfold);
	ClassDB::bind_method(D_METHOD("fold"), &EditorInspectorSection::fold);

	ADD_SIGNAL(MethodInfo("section_toggled_by_user", PropertyInfo(Variant::STRING_NAME, "property"), PropertyInfo(Variant::BOOL, "value")));
	ADD_SIGNAL(MethodInfo("property_keyed", PropertyInfo(Variant::STRING_NAME, "property")));
}

EditorInspectorSection::EditorInspectorSection() {

Review comment (suggestion):
"group" can be confused with Node groups.
```suggestion
				const String action_name = vformat(TTR("Set section %s on node %s"), group_name, object->get("name"));
```

Same with other usages of this term.

Code after:
void EditorInspectorSection::property_can_revert_changed(const String &p_path, bool p_can_revert) {
	bool had_revertable_properties = has_revertable_properties();
	if (p_can_revert) {
		revertable_properties.insert(p_path);
	} else {
		revertable_properties.erase(p_path);
	}
	if (has_revertable_properties() != had_revertable_properties) {
		queue_redraw();
	}
}

void EditorInspectorSection::_property_edited(const String &p_property) {
	if (!related_enable_property.is_empty() && p_property == related_enable_property) {
		update_property();
	}
}

void EditorInspectorSection::update_property() {
	if (!checkable) {
		return;
	}

	bool valid = false;
	Variant value_checked = object->get(related_enable_property, &valid);

	if (valid) {
		set_checked(value_checked.operator bool());
	}
}

void EditorInspectorSection::_update_popup() {
	if (!menu) {
		menu = memnew(PopupMenu);
		add_child(menu);
		menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorInspectorSection::menu_option));

		menu->add_icon_item(theme_cache.icon_copy, TTRC("Copy Section Values"), MENU_COPY_VALUE);
		menu->add_icon_item(theme_cache.icon_paste, TTRC("Paste Section Values"), MENU_PASTE_VALUE);
	}
}

void EditorInspectorSection::_collect_properties(LocalVector<String> &r_properties) const {
	List<PropertyInfo> property_list;
	object->get_property_list(&property_list, true);

	String current_category;
	String current_group;
	String current_subgroup;
	for (const PropertyInfo &prop_info : property_list) {
		if (prop_info.usage & PROPERTY_USAGE_GROUP) {