Skip to content

Commit

Permalink
Oh boy i'm dumb
Browse files Browse the repository at this point in the history
  • Loading branch information
smandrap authored Feb 16, 2024
1 parent 10352e3 commit 4970da8
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ local function prev_in_mcp()

if first_sel_t then id = reaper.GetMediaTrackInfo_Value(first_sel_t, 'IP_TRACKNUMBER') end

for i = id -2, 0, -1 do
for i = id - 2, 0, -1 do
local t = reaper.GetTrack(-1, i)
if reaper.IsTrackVisible(t, true) and reaper.GetMediaTrackInfo_Value(t, 'I_MCPW') > 0 and not reaper.IsTrackSelected(t) then
reaper.SetTrackSelected(t, true)
if reaper.IsTrackVisible(t, true) and reaper.GetMediaTrackInfo_Value(t, 'I_MCPW') > 0 then
reaper.SetOnlyTrackSelected(t)
return
end
end
Expand All @@ -27,6 +27,5 @@ if focus == mixer_hwnd then
prev_in_mcp()
reaper.Undo_EndBlock("Select Previous Track in Mixer", 0)
else
reaper.Main_OnCommand(40288, 0)
reaper.Main_OnCommand(40286, 0)
end

0 comments on commit 4970da8

Please sign in to comment.