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:
itsmattkc
2020-10-02 16:04:50 +10:00
parent 2fb7066155
commit 4204910796
16 changed files with 112 additions and 38 deletions
+3 -3
View File
@@ -922,8 +922,8 @@ void NodeView::UpdateBlockFilter()
// Show only edges between those dependencies
foreach (NodeViewEdge* edge, scene_.edge_map()) {
edge->setVisible((currently_visible.contains(edge->edge()->input()->parentNode())
&& currently_visible.contains(edge->edge()->output()->parentNode())));
edge->setVisible((currently_visible.contains(edge->edge()->input_node())
&& currently_visible.contains(edge->edge()->output_node())));
}
}
@@ -1024,7 +1024,7 @@ void NodeView::GraphEdgeRemoved(NodeEdgePtr edge)
{
scene_.RemoveEdge(edge);
Node* output_node = edge->output()->parentNode();
Node* output_node = edge->output_node();
// Check if this disconnected node still connects to a selected block, in which case do nothing
foreach (Block* b, selected_blocks_) {