diff options
author | David Robillard <d@drobilla.net> | 2008-08-17 23:00:34 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-17 23:00:34 +0000 |
commit | 14401d11e598651e7caf39cce884362e58ef5941 (patch) | |
tree | 05b2c57b1f55640149ba850a2f9f1fda175dccb8 /src/libs/client/ClientStore.cpp | |
parent | 9938fac4b15f8939c9056c16a3a7662575af52e1 (diff) | |
download | ingen-14401d11e598651e7caf39cce884362e58ef5941.tar.gz ingen-14401d11e598651e7caf39cce884362e58ef5941.tar.bz2 ingen-14401d11e598651e7caf39cce884362e58ef5941.zip |
Copy/paste of connections.
git-svn-id: http://svn.drobilla.net/lad/ingen@1426 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/ClientStore.cpp')
-rw-r--r-- | src/libs/client/ClientStore.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
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<PluginModel> plugin) void ClientStore::add_connection_orphan(std::pair<Path, Path> 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<PortModel> src_port = PtrCast<PortModel>(object(src_port_path)); SharedPtr<PortModel> dst_port = PtrCast<PortModel>(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; |