summaryrefslogtreecommitdiffstats
path: root/src/libs/client/PatchModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client/PatchModel.cpp')
-rw-r--r--src/libs/client/PatchModel.cpp9
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;
}