From f211975fd97c39668b61170d11960bd1c565ae79 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Apr 2007 20:10:33 +0000 Subject: Fix connections directly between subpatch input/output ports. git-svn-id: http://svn.drobilla.net/lad/ingen@427 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/ConnectionModel.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'src/libs/client/ConnectionModel.cpp') diff --git a/src/libs/client/ConnectionModel.cpp b/src/libs/client/ConnectionModel.cpp index ebce3340..4860a7db 100644 --- a/src/libs/client/ConnectionModel.cpp +++ b/src/libs/client/ConnectionModel.cpp @@ -70,37 +70,6 @@ ConnectionModel::dst_port_path() const return _dst_port->path(); } -const Path -ConnectionModel::patch_path() const -{ - // Resolved - if (_src_port && _dst_port) { - // Direct connection from patch input to patch output (pass through) - // (parent patch is parent of ports) - if (_src_port->parent() == _dst_port->parent()) { - SharedPtr parent_patch = PtrCast(_src_port->parent()); - if (parent_patch) - return parent_patch->path(); - } - } - - // Aside from the above special case, parent patch is parent of parent of ports - - const Path& src_node = _src_port_path.parent(); - const Path& dst_node = _dst_port_path.parent(); - Path patch_path = src_node.parent(); - - if (src_node.parent() != dst_node.parent()) { - // Connection to a patch port from inside the patch - assert(src_node.parent() == dst_node || dst_node.parent() == src_node); - if (src_node.parent() == dst_node) - patch_path = dst_node; - else - patch_path = src_node; - } - - return patch_path; -} typedef list > ConnectionList; -- cgit v1.2.1