summaryrefslogtreecommitdiffstats
path: root/src/serialisation/Serialiser.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-29 00:20:28 +0000
committerDavid Robillard <d@drobilla.net>2008-11-29 00:20:28 +0000
commit9c3d03cfab2ac6eda5c87325dcd3174e5812bc39 (patch)
tree6c109832bcec8b2ff08a15140867dad62fe7447e /src/serialisation/Serialiser.cpp
parent4c6f391dc7263521e9607123d7aca35d8257e61e (diff)
downloadingen-9c3d03cfab2ac6eda5c87325dcd3174e5812bc39.tar.gz
ingen-9c3d03cfab2ac6eda5c87325dcd3174e5812bc39.tar.bz2
ingen-9c3d03cfab2ac6eda5c87325dcd3174e5812bc39.zip
Only write index for Patches (i.e. don't even save the index of plugin ports, as per LV2r3).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1821 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation/Serialiser.cpp')
-rw-r--r--src/serialisation/Serialiser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp
index b9eff1f2..baf8a475 100644
--- a/src/serialisation/Serialiser.cpp
+++ b/src/serialisation/Serialiser.cpp
@@ -440,8 +440,9 @@ Serialiser::serialise_port(const Port* port, const Redland::Node& port_id)
_model->add_statement(port_id, "rdf:type",
Redland::Node(_model->world(), Redland::Node::RESOURCE, "lv2:OutputPort"));
- _model->add_statement(port_id, "lv2:index",
- AtomRDF::atom_to_node(_model->world(), Atom((int)port->index())));
+ if (dynamic_cast<Patch*>(port->graph_parent()))
+ _model->add_statement(port_id, "lv2:index",
+ AtomRDF::atom_to_node(_model->world(), Atom((int)port->index())));
_model->add_statement(port_id, "lv2:symbol",
Redland::Node(_model->world(), Redland::Node::LITERAL, port->path().name()));