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:
2026-07-25 11:29:09 +07:00
parent 0039f85913
commit 569ae9ef3e
2 changed files with 2 additions and 8 deletions
+1 -6
View File
@@ -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