diff options
author | David Robillard <d@drobilla.net> | 2006-06-12 04:48:20 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-12 04:48:20 +0000 |
commit | efee2b08f575e2c216cffa6f08a928223ab2cedb (patch) | |
tree | 089fdf9bc89aa04793b03cbfccb438a7a9c9f387 /src/libs/client/PatchModel.cpp | |
parent | 5818a04533e472820f6c6748b2f07d7d1ca5789a (diff) | |
download | ingen-efee2b08f575e2c216cffa6f08a928223ab2cedb.tar.gz ingen-efee2b08f575e2c216cffa6f08a928223ab2cedb.tar.bz2 ingen-efee2b08f575e2c216cffa6f08a928223ab2cedb.zip |
Store memory bug fixes (multiple ref ptr's to the same object, bad),
control panel fixes
git-svn-id: http://svn.drobilla.net/lad/grauph@32 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/PatchModel.cpp')
-rw-r--r-- | src/libs/client/PatchModel.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp index b19f7606..877f5df0 100644 --- a/src/libs/client/PatchModel.cpp +++ b/src/libs/client/PatchModel.cpp @@ -63,11 +63,10 @@ PatchModel::add_node(CountedPtr<NodeModel> nm) { assert(nm); assert(nm->name().find("/") == string::npos); - assert(nm->parent() == NULL); + assert(nm->parent().get() == this); assert(m_nodes.find(nm->name()) == m_nodes.end()); - m_nodes[nm->name()] = nm;//CountedPtr<NodeModel>(nm); - nm->set_parent(this); + m_nodes[nm->name()] = nm; new_node_sig.emit(nm); } @@ -222,9 +221,9 @@ PatchModel::remove_connection(const string& src_port_path, const string& dst_por bool PatchModel::polyphonic() const { - return (m_parent == NULL) + return (!m_parent) ? (m_poly > 1) - : (m_poly > 1) && m_poly == parent_patch()->poly() && m_poly > 1; + : (m_poly > 1) && m_poly == ((PatchModel*)m_parent.get())->poly() && m_poly > 1; } |