diff --git a/Scripts/Editor/NodeEditorGUI.cs b/Scripts/Editor/NodeEditorGUI.cs index 7f36e3f..d9df9c9 100755 --- a/Scripts/Editor/NodeEditorGUI.cs +++ b/Scripts/Editor/NodeEditorGUI.cs @@ -22,8 +22,6 @@ namespace XNodeEditor { Event e = Event.current; Matrix4x4 m = GUI.matrix; if (graph == null) return; - ValidateGraphEditor(); - Controls(); // Ensure we have all node indices covered while (orderedNodeIndices.Count < graph.nodes.Count) @@ -33,6 +31,9 @@ namespace XNodeEditor { orderedNodeIndices.RemoveAt( removeIndex ); } + ValidateGraphEditor(); + Controls(); + DrawGrid(position, zoom, panOffset); DrawConnections(); DrawDraggedConnection();