Fix incorrect selection.delete on connector

Co-authored-by: Andrew Prifer <AndrewPrifer@users.noreply.github.com>
This commit is contained in:
vezwork 2022-06-07 08:04:30 -04:00 committed by Elliot
parent af079f2203
commit fe12216ac8

View file

@ -258,10 +258,10 @@ function useConnectorContextMenu(
{ {
label: props.selection ? 'Delete (selection)' : 'Delete', label: props.selection ? 'Delete (selection)' : 'Delete',
callback: () => { callback: () => {
getStudio().transaction(({stateEditors}) => {
if (props.selection) { if (props.selection) {
props.selection.delete() props.selection.delete()
} else { } else {
getStudio().transaction(({stateEditors}) => {
stateEditors.coreByProject.historic.sheetsById.sequence.deleteKeyframes( stateEditors.coreByProject.historic.sheetsById.sequence.deleteKeyframes(
{ {
...props.leaf.sheetObject.address, ...props.leaf.sheetObject.address,
@ -269,8 +269,8 @@ function useConnectorContextMenu(
trackId: props.leaf.trackId, trackId: props.leaf.trackId,
}, },
) )
}
}) })
}
}, },
}, },
] ]