private void StopDragSelecting(Vector2 mousePos) { if (!_isDragSelecting) { return; } _isDragSelecting = false; FrameRange selectedRange = new FrameRange(); bool isSelectingTimelines; Rect selectionRect = GetDragSelectionRect(_dragSelectingStartPos, mousePos, out selectedRange, out isSelectingTimelines); if (!Event.current.shift && !Event.current.control) { SequenceEditor.DeselectAll(); } for (int i = 0; i != Editors.Count; ++i) { Rect timelineRect = Editors[i].Rect; if (timelineRect.yMin >= selectionRect.yMax) { break; } if (timelineRect.yMax <= selectionRect.yMin) { continue; } for (int j = 0; j != Editors[i].Editors.Count; ++j) { Rect trackRect = Editors[i].Editors[j].Rect; if (trackRect.yMin >= selectionRect.yMax) { break; } if (trackRect.yMax <= selectionRect.yMin) { continue; } if (Event.current.control) { Editors[i].Editors[j].DeselectEvents(selectedRange); } else { Editors[i].Editors[j].SelectEvents(selectedRange); } } } }