From fe12216ac8e305ba1f8f0e62047a50de776b1687 Mon Sep 17 00:00:00 2001 From: vezwork Date: Tue, 7 Jun 2022 08:04:30 -0400 Subject: [PATCH] Fix incorrect selection.delete on connector Co-authored-by: Andrew Prifer --- .../KeyframeEditor/BasicKeyframeConnector.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/BasicKeyframeConnector.tsx b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/BasicKeyframeConnector.tsx index 0cf8e78..451b7a4 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/BasicKeyframeConnector.tsx +++ b/theatre/studio/src/panels/SequenceEditorPanel/DopeSheet/Right/BasicKeyframedTrack/KeyframeEditor/BasicKeyframeConnector.tsx @@ -258,10 +258,10 @@ function useConnectorContextMenu( { label: props.selection ? 'Delete (selection)' : 'Delete', callback: () => { - getStudio().transaction(({stateEditors}) => { - if (props.selection) { - props.selection.delete() - } else { + if (props.selection) { + props.selection.delete() + } else { + getStudio().transaction(({stateEditors}) => { stateEditors.coreByProject.historic.sheetsById.sequence.deleteKeyframes( { ...props.leaf.sheetObject.address, @@ -269,8 +269,8 @@ function useConnectorContextMenu( trackId: props.leaf.trackId, }, ) - } - }) + }) + } }, }, ]