fix: allow drag-move of already-selected notes in piano roll
Previously clicking an already-selected note played preview and returned early, preventing drag. Now reuses existing selectedNoteIds for drag.
This commit is contained in:
@@ -4999,12 +4999,7 @@ const PianoRollTabEditor = ({ st, zoom, bpm, viewportWidth, onClose, onUpdateNot
|
||||
nextSelectedIds = [clickedNote.id];
|
||||
setSelectedNoteIds(nextSelectedIds);
|
||||
} else {
|
||||
// Note already selected -- only play preview, don't drag
|
||||
if (window.SonicSF) {
|
||||
const ctx = getAudioContext();
|
||||
window.SonicSF.playNote(clickedNote.pitch, 100, 300, ctx.currentTime, st.instrumentProgram, null);
|
||||
}
|
||||
return;
|
||||
nextSelectedIds = selectedNoteIds;
|
||||
}
|
||||
pushToUndo(notes);
|
||||
notesBeforeDragRef.current = JSON.parse(JSON.stringify(notes));
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user