diff options
author | David Robillard <d@drobilla.net> | 2006-09-18 06:24:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-18 06:24:53 +0000 |
commit | 6f93b3d7c80f9dee2d95fac1bbc4f781a6f45979 (patch) | |
tree | 82b27a4802198215546558c006f7ac4228ab0599 /src/libs/client/PatchModel.cpp | |
parent | d520692eb49ff9e5aded38061a204713571b095b (diff) | |
download | ingen-6f93b3d7c80f9dee2d95fac1bbc4f781a6f45979.tar.gz ingen-6f93b3d7c80f9dee2d95fac1bbc4f781a6f45979.tar.bz2 ingen-6f93b3d7c80f9dee2d95fac1bbc4f781a6f45979.zip |
Work on loading old (deprecated) patches.
More error tolerance in Store, related bugfixes.
Patch port adding (threading) bug fixed (made event blocking).
Better PatchView cacheing.
Moved generic things from engine to util (shared)
Bug fixes, features, etc.
git-svn-id: http://svn.drobilla.net/lad/ingen@142 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/PatchModel.cpp')
-rw-r--r-- | src/libs/client/PatchModel.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp index a0e94ba4..a8cdf4ef 100644 --- a/src/libs/client/PatchModel.cpp +++ b/src/libs/client/PatchModel.cpp @@ -107,14 +107,11 @@ PatchModel::add_node(CountedPtr<NodeModel> nm) NodeModelMap::iterator existing = m_nodes.find(nm->path().name()); - if (existing != m_nodes.end()) { - cerr << "Warning: node clash, assimilating old node " << _path << endl; - nm->assimilate((*existing).second); - (*existing).second = nm; - } else { - m_nodes[nm->path().name()] = nm; - new_node_sig.emit(nm); - } + // Store should have handled this by merging the two + assert(existing == m_nodes.end()); + + m_nodes[nm->path().name()] = nm; + new_node_sig.emit(nm); } @@ -235,10 +232,13 @@ PatchModel::add_connection(CountedPtr<ConnectionModel> cm) assert(cm); assert(cm->patch_path() == path()); assert(cm->src_port()); - assert(cm->src_port()->parent()->parent().get() == this - || cm->src_port()->parent().get() == this); - assert(cm->dst_port()->parent()->parent().get() == this - || cm->dst_port()->parent().get() == this); + assert(cm->dst_port()); + assert(cm->src_port()->parent()); + assert(cm->dst_port()->parent()); + assert(cm->src_port()->parent().get() == this + || cm->src_port()->parent()->parent().get() == this); + assert(cm->dst_port()->parent().get() == this + || cm->dst_port()->parent()->parent().get() == this); CountedPtr<ConnectionModel> existing = get_connection(cm->src_port_path(), cm->dst_port_path()); assert(!existing); // Store should have handled this |