Skip to content

Commit

Permalink
Overloading for DetachFromGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
VoidXH committed Apr 24, 2024
1 parent 76cffe9 commit 858ae40
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Cavern/Filters/Utilities/FilterGraphNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,16 @@ public void DetachParents() {
parents.Clear();
}

/// <summary>
/// Remove this node from the filter graph, and connect the parents and children directly.
/// </summary>
public void DetachFromGraph() => DetachFromGraph(true);

/// <summary>
/// Remove this node from the filter graph, from both parents and children.
/// </summary>
/// <param name="mergeConnections">Connect the parents and children together</param>
public void DetachFromGraph(bool mergeConnections = true) {
public void DetachFromGraph(bool mergeConnections) {
if (mergeConnections) {
for (int i = 0, c = parents.Count; i < c; i++) {
for (int j = 0, c2 = children.Count; j < c2; j++) {
Expand Down

0 comments on commit 858ae40

Please sign in to comment.