Skip to content

Commit

Permalink
Update smandrap_Select previous track in TCP or in Mixer.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
smandrap committed Feb 15, 2024
1 parent 3f9f248 commit 023ace2
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ local function prev_in_mcp()

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 then
reaper.SetOnlyTrackSelected(t)
if reaper.IsTrackVisible(t, true) and reaper.GetMediaTrackInfo_Value(t, 'I_MCPW') > 0 and not reaper.IsTrackSelected(t) then
reaper.SetTrackSelected(t, true)
return
end
end

reaper.SetOnlyTrackSelected(first_sel_t)
end


Expand All @@ -29,5 +27,6 @@ if focus == mixer_hwnd then
prev_in_mcp()
reaper.Undo_EndBlock("Select Previous Track in Mixer", 0)
else
reaper.Main_OnCommand(40286, 0)
reaper.Main_OnCommand(40288, 0)
end

0 comments on commit 023ace2

Please sign in to comment.