From 4defce238e4e568cd8586446ac4b1ab51e510254 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 19 Oct 2009 02:02:45 +0000 Subject: Fix saving properties of root patch ports (fix ticket #389). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2194 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/events/CreatePort.cpp | 5 ++++- src/serialisation/Serialiser.cpp | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/engine/events/CreatePort.cpp b/src/engine/events/CreatePort.cpp index b64e57b2..ba4fd9fe 100644 --- a/src/engine/events/CreatePort.cpp +++ b/src/engine/events/CreatePort.cpp @@ -99,7 +99,10 @@ CreatePort::pre_process() const uint32_t old_num_ports = _patch->num_ports(); _patch_port = _patch->create_port(_path.name(), _data_type, buffer_size, _is_output); - _patch_port->set_property("rdf:instanceOf", Atom(Atom::URI, _patch_port->meta_uri().str())); + if (_patch->parent()) + _patch_port->set_property("rdf:instanceOf", + Atom(Atom::URI, _patch_port->meta_uri().str())); + _patch_port->meta().properties().insert(_properties.begin(), _properties.end()); if (_patch_port) { diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index 239ce22c..a2e92454 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -355,6 +355,8 @@ Serialiser::serialise_patch(SharedPtr patch, const Redland::Node& _model->add_statement(patch_id, "lv2:port", port_id); serialise_port_meta(p, port_id); + if (root) + serialise_properties(port_id, p->properties()); } for (Shared::Patch::Connections::const_iterator c = patch->connections().begin(); -- cgit v1.2.1