public void SetData(TracklineData data) { Data = data; actionDrawers.Clear(); foreach (var d in data.Actions) { ActionDrawer drawer = new ActionDrawer(this); drawer.SetData(d); actionDrawers.Add(drawer); } }
internal void OnTrackAdded(TracklineData tracklineData, int insertIndex = -1) { if (insertIndex < 0) { insertIndex = trackDrawers.Count; } TracklineDrawer tracklineDrawer = new TracklineDrawer(this); tracklineDrawer.SetData(tracklineData); Data.Tracks.Insert(insertIndex, tracklineData); trackDrawers.Insert(insertIndex, tracklineDrawer); }