public void AddTrackToHistory(IToolTrack track) { ConfigToolContext.Instance.ToolTracker.AddTrackToHistory(track); }
/// <summary> /// Add new Track to history. /// Called by client after executing some action. /// </summary> /// <param name="command"></param> public void AddTrackToHistory(IToolTrack track) { var temp = -1; if (m_NextUndo.ContainsKey(Key)) { temp = m_NextUndo[Key]; } else { m_NextUndo.Add(Key, temp); } IList<IToolTrack> tempHistory = new List<IToolTrack>(); if (m_HistoryList.ContainsKey(Key)) { tempHistory = m_HistoryList[Key]; } else { m_HistoryList.Add(Key, tempHistory); } // Purge history list TrimHistoryList(temp, tempHistory); // Add command and increment undo counter tempHistory.Add(track); m_NextUndo[Key]++; }