diff options
author | David Robillard <d@drobilla.net> | 2014-02-02 18:22:52 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-02-02 18:22:52 +0000 |
commit | db9c2f21eaf8952cf17a06db508879d61e6d007f (patch) | |
tree | 1003ab733e27a2a60e8b167f922909564f12bf23 /src/client/ClientStore.cpp | |
parent | 104aa8285df2b827fcbfe08b83ef931628976d90 (diff) | |
download | ingen-db9c2f21eaf8952cf17a06db508879d61e6d007f.tar.gz ingen-db9c2f21eaf8952cf17a06db508879d61e6d007f.tar.bz2 ingen-db9c2f21eaf8952cf17a06db508879d61e6d007f.zip |
Remove client-side arcs in parent graph when ports are deleted (fix #960).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5332 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/ClientStore.cpp')
-rw-r--r-- | src/client/ClientStore.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp index a3fc60aa..80f210fe 100644 --- a/src/client/ClientStore.cpp +++ b/src/client/ClientStore.cpp @@ -118,6 +118,15 @@ ClientStore::remove_object(const Raul::Path& path) // Remove object from parent model if applicable if (object->parent()) { + SPtr<PortModel> port = dynamic_ptr_cast<PortModel>(top->second); + SPtr<GraphModel> gpparent = dynamic_ptr_cast<GraphModel>( + object->parent()->parent()); + if (port && gpparent) { + /* Port on a block in a graph (probably on a subgraph), + remove any connections in the parent's parent graph. */ + gpparent->remove_arcs_on(port); + } + object->parent()->remove_child(object); } } |