From 023ace2a8921add59cbe47fba965feec5893429f Mon Sep 17 00:00:00 2001 From: smandrap <60984250+smandrap@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:31:58 +0100 Subject: [PATCH] Update smandrap_Select previous track in TCP or in Mixer.lua --- ...smandrap_Select previous track in TCP or in Mixer.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Navigation/smandrap_Select previous track in TCP or in Mixer.lua b/Navigation/smandrap_Select previous track in TCP or in Mixer.lua index 18e8d11..47e2664 100644 --- a/Navigation/smandrap_Select previous track in TCP or in Mixer.lua +++ b/Navigation/smandrap_Select previous track in TCP or in Mixer.lua @@ -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 @@ -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 +