diff options
author | David Robillard <d@drobilla.net> | 2006-06-12 17:40:20 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-12 17:40:20 +0000 |
commit | e3600c6bd795fabff12faa4352bf3ba76b324222 (patch) | |
tree | 065356ecdd4151ceb30c822a3767401dc897c287 /src/libs/client/Store.cpp | |
parent | efee2b08f575e2c216cffa6f08a928223ab2cedb (diff) | |
download | ingen-e3600c6bd795fabff12faa4352bf3ba76b324222.tar.gz ingen-e3600c6bd795fabff12faa4352bf3ba76b324222.tar.bz2 ingen-e3600c6bd795fabff12faa4352bf3ba76b324222.zip |
Disconnecting working in GTK client
git-svn-id: http://svn.drobilla.net/lad/grauph@33 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/Store.cpp')
-rw-r--r-- | src/libs/client/Store.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp index 21470f41..56c6654f 100644 --- a/src/libs/client/Store.cpp +++ b/src/libs/client/Store.cpp @@ -34,6 +34,7 @@ Store::Store(SigClientInterface& emitter) emitter.new_node_sig.connect(sigc::mem_fun(this, &Store::new_node_event)); emitter.new_port_sig.connect(sigc::mem_fun(this, &Store::new_port_event)); emitter.connection_sig.connect(sigc::mem_fun(this, &Store::connection_event)); + emitter.disconnection_sig.connect(sigc::mem_fun(this, &Store::disconnection_event)); emitter.metadata_update_sig.connect(sigc::mem_fun(this, &Store::metadata_update_event)); } @@ -292,5 +293,22 @@ Store::connection_event(const string& src_port_path, const string& dst_port_path } +void +Store::disconnection_event(const string& src_port_path, const string& 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(); + + CountedPtr<PatchModel> patch = this->patch(patch_path); + if (patch) + patch->remove_connection(src, dst); + else + cerr << "ERROR: connection in nonexistant patch" << endl; +} + + } // namespace LibOmClient |