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/client/ClientStore.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/libs/client/ClientStore.cpp') diff --git a/src/libs/client/ClientStore.cpp b/src/libs/client/ClientStore.cpp index 6c2c81ff..b6477b1f 100644 --- a/src/libs/client/ClientStore.cpp +++ b/src/libs/client/ClientStore.cpp @@ -117,10 +117,13 @@ ClientStore::resolve_plugin_orphans(SharedPtr plugin) void ClientStore::add_connection_orphan(std::pair orphan) { - if (!_handle_orphans) - return; - cerr << "WARNING: Orphan connection " << orphan.first - << " -> " << orphan.second << " received." << endl; + // Do this anyway, it's needed to get the connections for copy&paste + //if (!_handle_orphans) + //return; + + if (_handle_orphans) + cerr << "WARNING: Orphan connection " << orphan.first + << " -> " << orphan.second << " received." << endl; _connection_orphans.push_back(orphan); } @@ -587,9 +590,8 @@ ClientStore::attempt_connection(const Path& src_port_path, const Path& dst_port_ { SharedPtr src_port = PtrCast(object(src_port_path)); SharedPtr dst_port = PtrCast(object(dst_port_path)); - - if (src_port && dst_port) { + if (src_port && dst_port) { assert(src_port->parent()); assert(dst_port->parent()); @@ -602,13 +604,9 @@ ClientStore::attempt_connection(const Path& src_port_path, const Path& dst_port_ dst_port->connected_to(src_port); patch->add_connection(cm); - return true; - } else if (add_orphan) { - add_connection_orphan(make_pair(src_port_path, dst_port_path)); - } return false; -- cgit v1.2.1