From f222cc61ddd3c37f8fd10146ea83edb0f0dd7bb7 Mon Sep 17 00:00:00 2001 From: Cole Lawrence Date: Mon, 30 May 2022 08:52:34 -0400 Subject: [PATCH] fix: Ensure that AggregateKeyframes don't get recreated when dragging Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com> --- .../Right/AggregatedKeyframeTrack/AggregatedKeyframeTrack.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregatedKeyframeTrack.tsx b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregatedKeyframeTrack.tsx index b91df57..4026d53 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregatedKeyframeTrack.tsx +++ b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/AggregatedKeyframeTrack/AggregatedKeyframeTrack.tsx @@ -79,7 +79,9 @@ function AggregatedKeyframeTrack_memo(props: IAggregatedKeyframeTracksProps) { layoutP={layoutP} viewModel={viewModel} aggregateKeyframes={posKfs} - key={'agg-' + position} + // To ensure that while dragging, we don't lose reference to the + // aggregate we're trying to drag. + key={'agg-' + keyframes[0].kf.id} selection={ selectedPositions.has(position) === true ? selection : undefined }