nodes: link edges to IDs rather than objects
Allows code to know whether the connected parameters has been removed or not.
This commit is contained in:
+2
-4
@@ -43,9 +43,7 @@ NodeParam::NodeParam(const QString &id) :
|
||||
NodeParam::~NodeParam()
|
||||
{
|
||||
// Clear all connected edges
|
||||
while (!edges_.isEmpty()) {
|
||||
DisconnectEdge(edges_.last());
|
||||
}
|
||||
DisconnectAll();
|
||||
}
|
||||
|
||||
const QString NodeParam::id() const
|
||||
@@ -111,7 +109,7 @@ const QVector<NodeEdgePtr> &NodeParam::edges()
|
||||
void NodeParam::DisconnectAll()
|
||||
{
|
||||
while (!edges_.isEmpty()) {
|
||||
DisconnectEdge(edges_.first());
|
||||
DisconnectEdge(edges_.last());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user