diff options
author | David Robillard <d@drobilla.net> | 2006-09-18 07:19:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-18 07:19:42 +0000 |
commit | f0d7a30b0a4d9daeb8db95c59a5b0e836b03b31b (patch) | |
tree | df254e018dbede7f7ef83a70a5f4c0d57102978e /src/libs/client/PatchModel.cpp | |
parent | 6f93b3d7c80f9dee2d95fac1bbc4f781a6f45979 (diff) | |
download | ingen-f0d7a30b0a4d9daeb8db95c59a5b0e836b03b31b.tar.gz ingen-f0d7a30b0a4d9daeb8db95c59a5b0e836b03b31b.tar.bz2 ingen-f0d7a30b0a4d9daeb8db95c59a5b0e836b03b31b.zip |
More store error correcting fixes.
Working (sometimes...) patch refresh button.
git-svn-id: http://svn.drobilla.net/lad/ingen@143 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/PatchModel.cpp')
-rw-r--r-- | src/libs/client/PatchModel.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp index a8cdf4ef..1d2078c2 100644 --- a/src/libs/client/PatchModel.cpp +++ b/src/libs/client/PatchModel.cpp @@ -126,7 +126,7 @@ PatchModel::remove_node(CountedPtr<NodeModel> nm) assert(i->second == nm); m_nodes.erase(i); removed_node_sig.emit(nm); - i->second->parent().reset(); + //i->second->parent().reset(); return; } @@ -241,11 +241,14 @@ PatchModel::add_connection(CountedPtr<ConnectionModel> cm) || 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 - m_connections.push_back(cm); - - new_connection_sig.emit(cm); + if (existing) { + assert(cm->src_port() == existing->src_port()); + assert(cm->dst_port() == existing->dst_port()); + } else { + m_connections.push_back(cm); + new_connection_sig.emit(cm); + } } @@ -291,9 +294,9 @@ PatchModel::disable() bool PatchModel::polyphonic() const { - return (!_parent) - ? (m_poly > 1) - : (m_poly > 1) && m_poly == ((PatchModel*)_parent.get())->poly() && m_poly > 1; + return (_parent) + ? (m_poly > 1) && m_poly == PtrCast<PatchModel>(_parent)->poly() && m_poly > 1 + : (m_poly > 1); } |