Skip to content

Commit 9aa4290

Browse files
committed
Fixed multi-selection drag and drop of edges.
1 parent 53894f2 commit 9aa4290

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Assets/com.alelievr.NodeGraphProcessor/Editor/Views/PortView.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ public override void Disconnect(Edge edge)
137137
if (!(edge as EdgeView).isConnected)
138138
return ;
139139

140-
var inputNode = (edge.input as PortView).owner;
141-
var outputNode = (edge.output as PortView).owner;
140+
var inputNode = (edge.input as PortView)?.owner;
141+
var outputNode = (edge.output as PortView)?.owner;
142142

143-
inputNode.OnPortDisconnected(edge.input as PortView);
144-
outputNode.OnPortDisconnected(edge.output as PortView);
143+
inputNode?.OnPortDisconnected(edge.input as PortView);
144+
outputNode?.OnPortDisconnected(edge.output as PortView);
145145

146146
edges.Remove(edge as EdgeView);
147147
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99
### Fixed
1010
- Fixed fields with [Settings] attribute not showing up with inheritance.
1111
- Fixed selection still active when selecting nodes without inspector fields.
12+
- Fixed multi-selection drag and drop of edges.
1213

1314
### Changed
1415
- Fields with both attributes [SerializeField] and [ShowInInspector] are now visible in both the node and inspector.

0 commit comments

Comments
 (0)