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

Code before:
						ur->add_do_property(n, property_name, pair.value);
						ur->add_undo_property(n, property_name, n->get(property_name));
					}
				}

				ur->commit_action();
			} else if (EditorDebuggerRemoteObjects *remote_objects = Object::cast_to<EditorDebuggerRemoteObjects>(object)) {
				const int size = remote_objects->remote_object_ids.size();
				ur->create_action(size == 1 ? vformat(TTR("Set category %s"), category_name) : vformat(TTR("Set %s on %d objects"), category_name, size), UndoRedo::MERGE_ENDS);

				for (const KeyValue<Variant, Variant> &pair : clipboard) {
					const String property_name = pair.key;
					String name = property_name;
					if (!remote_objects->prop_values.has(name) || String(name).begins_with("Constants/")) {
						continue;
					}

					// Change it back to the real name when fetching.
					if (name == "Script") {
						name = "script";
					} else if (name.begins_with("Metadata/")) {
						name = name.replace_first("Metadata/", "metadata/");
					}

					Dictionary values = remote_objects->prop_values[property_name];
					Dictionary old_values = values.duplicate();
					for (const uint64_t key : values.keys()) {
						values.set(key, pair.value);
					}
					ur->add_do_method(remote_objects, SNAME("emit_signal"), SNAME("values_edited"), name, values, "");
					ur->add_undo_method(remote_objects, SNAME("emit_signal"), SNAME("values_edited"), name, old_values, "");
				}

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

				for (const KeyValue<Variant, Variant> &pair : clipboard) {
					const String property_name = pair.key;
					ur->add_do_property(object, property_name, pair.value);
					ur->add_undo_property(object, property_name, object->get(property_name));
				}

				ur->commit_action();
			}
		} break;

		case MENU_OPEN_DOCS: {
			ScriptEditor::get_singleton()->goto_help("class:" + doc_class_name);
			EditorNode::get_singleton()->get_editor_main_screen()->select(EditorMainScreen::EDITOR_SCRIPT);

Review comment (suggestion):
This does not compile. You need to include `core/variant/typed_dictionary.h`.

Code after:
						String property_name = pair.key;
						ur->add_do_property(n, property_name, pair.value);
						ur->add_undo_property(n, property_name, n->get(property_name));
					}
				}

				ur->commit_action();
			} else if (EditorDebuggerRemoteObjects *remote_objects = Object::cast_to<EditorDebuggerRemoteObjects>(object)) {
				const int size = remote_objects->remote_object_ids.size();
				ur->create_action(size == 1 ? vformat(TTR("Set category %s"), category_name) : vformat(TTR("Set %s on %d objects"), category_name, size), UndoRedo::MERGE_ENDS);

				for (const KeyValue<Variant, Variant> &pair : clipboard) {
					const String property_name = pair.key;
					String name = property_name;
					if (!remote_objects->prop_values.has(name) || String(name).begins_with("Constants/")) {
						continue;
					}

					// Change it back to the real name when fetching.
					if (name == "Script") {
						name = "script";
					} else if (name.begins_with("Metadata/")) {
						name = name.replace_first("Metadata/", "metadata/");
					}

					Dictionary values = remote_objects->prop_values[property_name];
					Dictionary old_values = values.duplicate();
					for (const uint64_t key : values.keys()) {
						values.set(key, pair.value);
					}
					ur->add_do_method(remote_objects, SNAME("emit_signal"), SNAME("values_edited"), name, values, "");
					ur->add_undo_method(remote_objects, SNAME("emit_signal"), SNAME("values_edited"), name, old_values, "");
				}

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

				for (const KeyValue<Variant, Variant> &pair : clipboard) {
					const String property_name = pair.key;
					ur->add_do_property(object, property_name, pair.value);
					ur->add_undo_property(object, property_name, object->get(property_name));
				}

				ur->commit_action();
			}
		} break;

		case MENU_OPEN_DOCS: {
			ScriptEditor::get_singleton()->goto_help("class:" + doc_class_name);