From 14401d11e598651e7caf39cce884362e58ef5941 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 17 Aug 2008 23:00:34 +0000 Subject: Copy/paste of connections. git-svn-id: http://svn.drobilla.net/lad/ingen@1426 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/shared/Builder.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/libs/shared/Builder.cpp') diff --git a/src/libs/shared/Builder.cpp b/src/libs/shared/Builder.cpp index 83e0f3d2..2b5e954c 100644 --- a/src/libs/shared/Builder.cpp +++ b/src/libs/shared/Builder.cpp @@ -41,24 +41,27 @@ Builder::build(SharedPtr object) SharedPtr patch = PtrCast(object); if (patch) { if (patch->path() != "/") - _interface.new_patch(patch->path() + "_copy", patch->internal_polyphony()); + _interface.new_patch(patch->path(), patch->internal_polyphony()); build_object(object); for (Patch::Connections::const_iterator i = patch->connections().begin(); - i != patch->connections().end(); ++i) + i != patch->connections().end(); ++i) { + cout << "BUILDER CONNECTION: " <<(*i)->src_port_path() + << " -> " << (*i)->dst_port_path() << endl; _interface.connect((*i)->src_port_path(), (*i)->dst_port_path()); + } return; } SharedPtr node = PtrCast(object); if (node) { - _interface.new_node(node->path() + "_copy", node->plugin()->uri()); + _interface.new_node(node->path(), node->plugin()->uri()); build_object(object); return; } SharedPtr port = PtrCast(object); if (port) { - _interface.new_port(port->path() + "_copy", port->index(), port->type().uri(), !port->is_input()); + _interface.new_port(port->path(), port->index(), port->type().uri(), !port->is_input()); build_object(object); return; } @@ -70,11 +73,11 @@ Builder::build_object(SharedPtr object) { for (GraphObject::Variables::const_iterator i = object->variables().begin(); i != object->variables().end(); ++i) - _interface.set_variable(object->path() + "_copy", i->first, i->second); + _interface.set_variable(object->path(), i->first, i->second); for (GraphObject::Properties::const_iterator i = object->properties().begin(); i != object->properties().end(); ++i) - _interface.set_property(object->path() + "_copy", i->first, i->second); + _interface.set_property(object->path(), i->first, i->second); } -- cgit v1.2.1