From 2e5df4c0d30fea03f0f3b176a449e17da5fc25f9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 14 Oct 2016 14:57:41 -0400 Subject: Simplify port model code --- src/client/ClientStore.cpp | 17 ++--------------- src/client/PortModel.cpp | 1 - 2 files changed, 2 insertions(+), 16 deletions(-) (limited to 'src/client') 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 graph = connection_graph(tail_path, head_path); SPtr 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 tail = dynamic_ptr_cast(_object(src_path)); - SPtr head = dynamic_ptr_cast(_object(dst_path)); - - if (tail) - tail->disconnected_from(head); - - if (head) - head->disconnected_from(tail); - + SPtr tail = dynamic_ptr_cast(_object(src_path)); + SPtr head = dynamic_ptr_cast(_object(dst_path)); SPtr 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 model) if (port) { _index = port->_index; _direction = port->_direction; - _connections = port->_connections; _signal_value_changed.emit(get_property(_uris.ingen_value)); } } -- cgit v1.2.1