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',
callback: () => {
getStudio().transaction(({stateEditors}) => {
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,
},
)
}
})
}
},
},
]