diff options
author | David Robillard <d@drobilla.net> | 2009-10-31 23:59:57 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-31 23:59:57 +0000 |
commit | 2a525cc1aa5396f12f7b8fdaf3e8ea11cbe25247 (patch) | |
tree | fc1d1f029a7b3c8675b70b898d2ae30a3c922bcb /src | |
parent | fe50d3ce33cb78b53730c156034f4a0d39bc6923 (diff) | |
download | ingen-2a525cc1aa5396f12f7b8fdaf3e8ea11cbe25247.tar.gz ingen-2a525cc1aa5396f12f7b8fdaf3e8ea11cbe25247.tar.bz2 ingen-2a525cc1aa5396f12f7b8fdaf3e8ea11cbe25247.zip |
Remove connections in the GUI before ports, preventing missed lookups.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2209 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/client/PatchModel.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/PatchModel.cpp b/src/client/PatchModel.cpp index cec8b13b..25255f06 100644 --- a/src/client/PatchModel.cpp +++ b/src/client/PatchModel.cpp @@ -52,14 +52,9 @@ PatchModel::remove_child(SharedPtr<ObjectModel> o) assert(o->path().is_child_of(_path)); assert(o->parent().get() == this); - SharedPtr<PortModel> pm = PtrCast<PortModel>(o); - if (pm) - remove_port(pm); - // Remove any connections which referred to this object, // since they can't possibly exist anymore - for (Connections::iterator j = _connections->begin(); j != _connections->end() ; ) { - + for (Connections::iterator j = _connections->begin(); j != _connections->end(); ) { Connections::iterator next = j; ++next; @@ -77,6 +72,10 @@ PatchModel::remove_child(SharedPtr<ObjectModel> o) j = next; } + SharedPtr<PortModel> pm = PtrCast<PortModel>(o); + if (pm) + remove_port(pm); + SharedPtr<NodeModel> nm = PtrCast<NodeModel>(o); if (nm) signal_removed_node.emit(nm); |