fix: remove MIDI tab loop button + Ctrl+click clear range

This commit is contained in:
2026-07-26 11:03:51 +07:00
parent 9438f44052
commit 5b500ebdf3
3 changed files with 13 additions and 8 deletions
+7 -7
View File
@@ -5764,13 +5764,7 @@ const beatSec = 60.0 / (parseInt(bpm) || 120);
}), React.createElement("span", { className: "text-zinc-500" }, "-"), React.createElement("input", {
type: "number", value: aiBarEnd, onChange: e => setAiBarEnd(parseInt(e.target.value) || 1),
className: "w-8 bg-zinc-900 border border-zinc-700 text-zinc-200 rounded px-1 py-0.5 text-xs text-center"
}), React.createElement("span", { className: "text-zinc-500" }, "bar"), React.createElement("button", {
onClick: () => {
setIsLooping(!isLooping);
setSubTabs(prev => prev.map(s => s.id === st.id ? { ...s, isLooping: !(s.isLooping || false) } : s));
},
className: `px-2 py-0.5 rounded text-xs ${isLooping ? 'bg-emerald-700 text-white border border-emerald-500' : 'bg-zinc-800 text-zinc-400'}`
}, React.createElement("i", { "data-lucide": "repeat", className: "w-3 h-3" }))), React.createElement("div", {
}), React.createElement("span", { className: "text-zinc-500" }, "bar")), React.createElement("div", {
className: "flex bg-zinc-800 p-0.5 rounded border border-zinc-700 text-xs"
}, ['velocity', 'pan'].map(mode => React.createElement("button", {
key: mode,
@@ -5808,6 +5802,12 @@ const beatSec = 60.0 / (parseInt(bpm) || 120);
if (clickTime >= 0) {
setSubTabs(prev => prev.map(s => s.id === st.id ? { ...s, currentTime: clickTime } : s));
}
if (e.ctrlKey || e.metaKey) {
setLoopStartBeat(null);
setLoopEndBeat(null);
setSubTabs(prev => prev.map(s => s.id === st.id ? { ...s, selectionStart: null, selectionEnd: null } : s));
return;
}
if (e.shiftKey) {
const beatSnap = getSnapBeat(clickBeat, snapVal);
if (loopStartBeat === null) {