Skip to content

Commit

Permalink
Fixed multi-selection drag and drop of edges.
Browse files Browse the repository at this point in the history
  • Loading branch information
alelievr committed Oct 1, 2021
1 parent 3512063 commit 4af0e76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Editor/Views/PortView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ public override void Disconnect(Edge edge)
if (!(edge as EdgeView).isConnected)
return ;

var inputNode = (edge.input as PortView).owner;
var outputNode = (edge.output as PortView).owner;
var inputNode = (edge.input as PortView)?.owner;
var outputNode = (edge.output as PortView)?.owner;

inputNode.OnPortDisconnected(edge.input as PortView);
outputNode.OnPortDisconnected(edge.output as PortView);
inputNode?.OnPortDisconnected(edge.input as PortView);
outputNode?.OnPortDisconnected(edge.output as PortView);

edges.Remove(edge as EdgeView);
}
Expand Down

0 comments on commit 4af0e76

Please sign in to comment.