public void removeData(TimelineData data) { selectionCollection.removeButton(data._CurrentButton); TimelineViewButton button = namedTracks[data.Track].removeButton(data); if (button == selectionCollection.CurrentButton) { //Null the internal property first as you do not want to toggle the state of the button that has already been disposed. selectionCollection.nullCurrentButton(); selectionCollection.setCurrentButton(null); } }
internal void removeSelection(TimelineSelectionCollection selectionCollection, TimelineSelectionBox timelineSelectionBox) { foreach (TimelineViewButton button in buttons) { if (timelineSelectionBox.intersects(button)) { selectionCollection.removeButton(button); } } }