1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

Move ensured node indices up to prevent SelectNode index errors

This commit is contained in:
Kailey Joanette 2020-04-29 12:40:14 -04:00
parent bcb65a1788
commit 1e44fcb3eb

View File

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