Skip to content

Commit 86276a3

Browse files
committed
Fix node not removed from the inspector when the node is deleted in the graph
1 parent 2e1723d commit 86276a3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,11 @@ int GetPriority(GraphElement e)
321321
case EdgeView edge:
322322
Disconnect(edge);
323323
return true;
324-
case BaseNodeView node:
325-
ExceptionToLog.Call(() => node.OnRemoved());
326-
graph.RemoveNode(node.nodeTarget);
327-
RemoveElement(node);
324+
case BaseNodeView nodeView:
325+
nodeInspector.NodeViewRemoved(nodeView);
326+
ExceptionToLog.Call(() => nodeView.OnRemoved());
327+
graph.RemoveNode(nodeView.nodeTarget);
328+
RemoveElement(nodeView);
328329
if (Selection.activeObject == nodeInspector)
329330
UpdateNodeInspectorSelection();
330331
return true;

0 commit comments

Comments
 (0)