diff options
author | David Robillard <d@drobilla.net> | 2016-10-14 14:57:41 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-10-14 16:27:16 -0400 |
commit | 2e5df4c0d30fea03f0f3b176a449e17da5fc25f9 (patch) | |
tree | a0e136147bcadbf8c69dc3acf9f279402ef4f2e3 /src/client | |
parent | c16ad68648812a8c4eb90e8666764959b166ac13 (diff) | |
download | ingen-2e5df4c0d30fea03f0f3b176a449e17da5fc25f9.tar.gz ingen-2e5df4c0d30fea03f0f3b176a449e17da5fc25f9.tar.bz2 ingen-2e5df4c0d30fea03f0f3b176a449e17da5fc25f9.zip |
Simplify port model code
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/ClientStore.cpp | 17 | ||||
-rw-r--r-- | src/client/PortModel.cpp | 1 |
2 files changed, 2 insertions, 16 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index e99f9c73..d69992fe 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -435,10 +435,6 @@ ClientStore::attempt_connection(const Raul::Path& tail_path, if (tail && head) { SPtr<GraphModel> graph = connection_graph(tail_path, head_path); SPtr<ArcModel> arc(new ArcModel(tail, head)); - - tail->connected_to(head); - head->connected_to(tail); - graph->add_arc(arc); return true; } else { @@ -459,15 +455,8 @@ void ClientStore::disconnect(const Raul::Path& src_path, const Raul::Path& dst_path) { - SPtr<PortModel> tail = dynamic_ptr_cast<PortModel>(_object(src_path)); - SPtr<PortModel> head = dynamic_ptr_cast<PortModel>(_object(dst_path)); - - if (tail) - tail->disconnected_from(head); - - if (head) - head->disconnected_from(tail); - + SPtr<PortModel> tail = dynamic_ptr_cast<PortModel>(_object(src_path)); + SPtr<PortModel> head = dynamic_ptr_cast<PortModel>(_object(dst_path)); SPtr<GraphModel> graph = connection_graph(src_path, dst_path); if (graph) graph->remove_arc(tail.get(), head.get()); @@ -493,8 +482,6 @@ ClientStore::disconnect_all(const Raul::Path& parent_graph, || arc->head()->parent() == object || arc->tail()->path() == path || arc->head()->path() == path) { - arc->tail()->disconnected_from(arc->head()); - arc->head()->disconnected_from(arc->tail()); graph->remove_arc(arc->tail().get(), arc->head().get()); } } diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp index 9b534ae1..7e5456dd 100644 --- a/src/client/PortModel.cpp +++ b/src/client/PortModel.cpp @@ -70,7 +70,6 @@ PortModel::set(SPtr<ObjectModel> model) if (port) { _index = port->_index; _direction = port->_direction; - _connections = port->_connections; _signal_value_changed.emit(get_property(_uris.ingen_value)); } } |