From 75527443361902ff924ddd01755b9268fcb97b2b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 30 Dec 2009 15:44:40 +0000 Subject: Fix serialisation of subpatches. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2322 a436a847-0d15-0410-975c-d299462d15a1 --- src/serialisation/Serialiser.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/serialisation') diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index e070d771..33c438e5 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -321,18 +321,18 @@ Serialiser::serialise_patch(SharedPtr patch, const Redland::Node& for (Store::const_iterator n = _store->children_begin(patch); n != _store->children_end(patch); ++n) { - if (n->second->graph_parent() != patch.get()) + if (n->first.parent() != patch->path()) continue; - SharedPtr patch = PtrCast(n->second); + SharedPtr subpatch = PtrCast(n->second); SharedPtr node = PtrCast(n->second); - if (patch) { + if (subpatch) { const Redland::Resource class_id(_model->world(), - string(META_PREFIX) + patch->path().chop_start("/")); + string(META_PREFIX) + subpatch->path().chop_start("/")); const Redland::Node node_id(instance_rdf_node(n->second->path())); _model->add_statement(patch_id, "ingen:node", node_id); - serialise_patch(patch, class_id); - serialise_node(patch, class_id, node_id); + serialise_patch(subpatch, class_id); + serialise_node(subpatch, class_id, node_id); } else if (node) { const Redland::Resource class_id(_model->world(), node->plugin()->uri().str()); const Redland::Node node_id(instance_rdf_node(n->second->path())); -- cgit v1.2.1