summaryrefslogtreecommitdiffstats
path: root/src/libs/client/PatchModel.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-19 06:17:49 +0000
committerDavid Robillard <d@drobilla.net>2006-06-19 06:17:49 +0000
commit2db1897709eba0e80677bd09e8444e7320e15120 (patch)
tree8062b5ede632c1c084a2c3b43bbd1a3d9991734e /src/libs/client/PatchModel.cpp
parent4adc4f4a2b4f57f43affcd48f2c01c60f471b20a (diff)
downloadingen-2db1897709eba0e80677bd09e8444e7320e15120.tar.gz
ingen-2db1897709eba0e80677bd09e8444e7320e15120.tar.bz2
ingen-2db1897709eba0e80677bd09e8444e7320e15120.zip
Connecting of patch ports internally (seemingly anyway, data not flowing yet)
git-svn-id: http://svn.drobilla.net/lad/grauph@61 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/PatchModel.cpp')
-rw-r--r--src/libs/client/PatchModel.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp
index 7d786301..265a17d8 100644
--- a/src/libs/client/PatchModel.cpp
+++ b/src/libs/client/PatchModel.cpp
@@ -163,19 +163,23 @@ void
PatchModel::add_connection(CountedPtr<ConnectionModel> cm)
{
assert(cm);
- assert(cm->src_port_path().parent().parent() == m_path);
- assert(cm->dst_port_path().parent().parent() == m_path);
+ //assert(cm->src_port_path().parent().parent() == m_path);
+ //assert(cm->dst_port_path().parent().parent() == m_path);
assert(cm->patch_path() == path());
+ cerr << "PatchModel::add_connection: " << cm->src_port_path() << " -> " << cm->dst_port_path() << endl;
+
CountedPtr<ConnectionModel> existing = get_connection(cm->src_port_path(), cm->dst_port_path());
if (existing) {
return;
}
- NodeModel* src_node = get_node(cm->src_port_path().parent().name()).get();
+ NodeModel* src_node = (cm->src_port_path().parent() == path())
+ ? this : get_node(cm->src_port_path().parent().name()).get();
PortModel* src_port = (src_node == NULL) ? NULL : src_node->get_port(cm->src_port_path().name()).get();
- NodeModel* dst_node = get_node(cm->dst_port_path().parent().name()).get();
+ NodeModel* dst_node = (cm->dst_port_path().parent() == path())
+ ? this : get_node(cm->dst_port_path().parent().name()).get();
PortModel* dst_port = (dst_node == NULL) ? NULL : dst_node->get_port(cm->dst_port_path().name()).get();
assert(src_port != NULL);