fix: click empty space always draws note regardless of tool

Removed tool check for drawing. Default tool back to 'select'.
Click + drag on empty piano roll = draw notes, no tool switch needed.
This commit is contained in:
2026-07-25 12:24:47 +07:00
parent bf22679506
commit 963a5519af
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -4544,7 +4544,7 @@ const AIPresetModal = ({ isOpen, onClose }) => {
}; };
const PianoRollTabEditor = ({ st, zoom, bpm, viewportWidth, onClose, onUpdateNotes, onSaveNotes, setSubTabs, onPlayPause, onStop, isPlaying, playPreviewNote, showToast }) => { const PianoRollTabEditor = ({ st, zoom, bpm, viewportWidth, onClose, onUpdateNotes, onSaveNotes, setSubTabs, onPlayPause, onStop, isPlaying, playPreviewNote, showToast }) => {
const [activeRollTool, setActiveRollTool] = React.useState('pen'); const [activeRollTool, setActiveRollTool] = React.useState('select');
const [snapVal, setSnapVal] = React.useState('1/16'); const [snapVal, setSnapVal] = React.useState('1/16');
const [ccMode, setCcMode] = React.useState('velocity'); const [ccMode, setCcMode] = React.useState('velocity');
const [rollZoom, setRollZoom] = React.useState(60); // local horizontal zoom factor const [rollZoom, setRollZoom] = React.useState(60); // local horizontal zoom factor
@@ -5045,7 +5045,7 @@ const PianoRollTabEditor = ({ st, zoom, bpm, viewportWidth, onClose, onUpdateNot
startOffsetPitch: pitch - clickedNote.pitch, startOffsetPitch: pitch - clickedNote.pitch,
selectedNotesOffset: selectedNotesOffset selectedNotesOffset: selectedNotesOffset
}); });
} else if (activeRollTool === 'pen') { } else {
// Click on empty space with pen tool: DRAW a new note (brush mode with visitedPitches) // Click on empty space with pen tool: DRAW a new note (brush mode with visitedPitches)
pushToUndo(notes); pushToUndo(notes);
const start = getSnapBeat(beat, snapVal); const start = getSnapBeat(beat, snapVal);
File diff suppressed because one or more lines are too long