Skip to content

Commit bea17d7

Browse files
committed
Fixed ports duplicated after undo
1 parent 9d50af1 commit bea17d7

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ void ReloadView()
682682
if (e is BaseNodeView v && this.Contains(v))
683683
selectedNodeGUIDs.Add(v.nodeTarget.GUID);
684684
}
685-
685+
686686
// Remove everything
687687
RemoveNodeViews();
688688
RemoveEdges();

Assets/com.alelievr.NodeGraphProcessor/Runtime/Elements/BaseNode.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ public virtual void InitializePorts()
249249
{
250250
InitializeCustomPortTypeMethods();
251251

252+
inputPorts.Clear();
253+
outputPorts.Clear();
252254
foreach (var key in OverrideFieldOrder(nodeFields.Values.Select(k => k.info)))
253255
{
254256
var nodeField = nodeFields[key.Name];

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111
- Added an example with Waitable and async nodes
1212
- Added drag and drop support for assets and scene objects directly into a graph
1313

14+
### Fixed
15+
- Fixed ports duplicated after undo
16+
1417
## [1.0.1]
1518

1619
### Added

0 commit comments

Comments
 (0)