fix: piano roll dropdown lists tracks only, not every MIDI item
This commit is contained in:
+17
-7
@@ -7396,14 +7396,24 @@ const beatSec = 60.0 / (parseInt(bpm) || 120);
|
|||||||
}, React.createElement("div", {
|
}, React.createElement("div", {
|
||||||
className: "flex items-center gap-4"
|
className: "flex items-center gap-4"
|
||||||
}, React.createElement("select", {
|
}, React.createElement("select", {
|
||||||
value: st.target_id || '',
|
value: st.trackId || '',
|
||||||
onChange: function(e) { handleSwitchMidiItem(e.target.value); },
|
onChange: function(e) {
|
||||||
|
var trkId = e.target.value;
|
||||||
|
var trkSel = (activeTracks || []).find(function(t) { return t.id === trkId; });
|
||||||
|
if (trkSel && trkSel.midiItems && trkSel.midiItems.length) handleSwitchMidiItem(trkSel.midiItems[0].id);
|
||||||
|
},
|
||||||
className: "bg-zinc-800 border border-zinc-700 text-yellow-500 font-bold text-xs rounded px-1.5 py-0.5 outline-none focus:border-yellow-500 max-w-[180px] uppercase"
|
className: "bg-zinc-800 border border-zinc-700 text-yellow-500 font-bold text-xs rounded px-1.5 py-0.5 outline-none focus:border-yellow-500 max-w-[180px] uppercase"
|
||||||
}, allMidiItems.map(function(m) {
|
}, (function() {
|
||||||
return React.createElement("option", { key: m.id, value: m.id },
|
var seenTrackOpts = {};
|
||||||
(m._trackName || '') + ' - ' + (m.name || 'MIDI')
|
var trackOpts = [];
|
||||||
);
|
(activeTracks || []).forEach(function(t) {
|
||||||
})), activeParentTrackName ? React.createElement("span", {
|
if (!t.midiItems || !t.midiItems.length) return;
|
||||||
|
if (seenTrackOpts[t.id]) return;
|
||||||
|
seenTrackOpts[t.id] = true;
|
||||||
|
trackOpts.push(React.createElement("option", { key: t.id, value: t.id }, t.name || t.id));
|
||||||
|
});
|
||||||
|
return trackOpts;
|
||||||
|
}())), activeParentTrackName ? React.createElement("span", {
|
||||||
className: "text-[9px] text-zinc-500 ml-1"
|
className: "text-[9px] text-zinc-500 ml-1"
|
||||||
}, "(Belongs to: ", React.createElement("span", { className: "text-zinc-400 font-semibold" }, activeParentTrackName), ")") : null, React.createElement("div", {
|
}, "(Belongs to: ", React.createElement("span", { className: "text-zinc-400 font-semibold" }, activeParentTrackName), ")") : null, React.createElement("div", {
|
||||||
className: "flex items-center gap-1 text-xs"
|
className: "flex items-center gap-1 text-xs"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user