From 2db1897709eba0e80677bd09e8444e7320e15120 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 19 Jun 2006 06:17:49 +0000 Subject: 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 --- src/libs/client/Store.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/libs/client/Store.cpp') diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp index 542c1bc5..15f91786 100644 --- a/src/libs/client/Store.cpp +++ b/src/libs/client/Store.cpp @@ -311,24 +311,22 @@ Store::metadata_update_event(const string& subject_path, const string& predicate void -Store::connection_event(const string& src_port_path, const string& dst_port_path) +Store::connection_event(const Path& src_port_path, const Path& dst_port_path) { - const Path& src = src_port_path; - const Path& dst = dst_port_path; - - assert(src.parent().parent() == dst.parent().parent()); - const Path& patch_path = src.parent().parent(); + // ConnectionModel has the clever patch-path-figuring-out stuff in it, so + // just make one right away to get at that + ConnectionModel* cm = new ConnectionModel(src_port_path, dst_port_path); - CountedPtr patch = this->patch(patch_path); + CountedPtr patch = this->patch(cm->patch_path()); if (patch) - patch->add_connection(new ConnectionModel(src, dst)); + patch->add_connection(cm); else cerr << "ERROR: connection in nonexistant patch" << endl; } void -Store::disconnection_event(const string& src_port_path, const string& dst_port_path) +Store::disconnection_event(const Path& src_port_path, const Path& dst_port_path) { const Path& src = src_port_path; const Path& dst = dst_port_path; -- cgit v1.2.1