Skip to content

Commit

Permalink
Release Link time selection or loop points to arrange view v1.2 (#1343)
Browse files Browse the repository at this point in the history
- Fixed edit cursor lost outside of time selection on scrolling
  • Loading branch information
AZpercussion authored Mar 31, 2024
1 parent be62b7b commit 92caaaf
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- @description Link time selection or loop points to arrange view
-- @author AZ
-- @version 1.1
-- @changelog - Fixed dependency on option "Loop points linked to time selection"
-- @version 1.2
-- @changelog - Fixed edit cursor lost outside of time selection on scrolling
-- @link Forum thread https://forum.cockos.com/showthread.php?t=288069
-- @donation Donate via PayPal https://www.paypal.me/AZsound
-- @about
Expand Down Expand Up @@ -59,15 +59,9 @@ function main()
local _, _ = reaper.GetSet_LoopTimeRange2( 0, true, true, startTSgrid, endTSgrid, false )

local playState = reaper.GetPlayStateEx(0)
local curPos
local curPos = reaper.GetCursorPosition()

if oldTSstart ~= startTSgrid then

if playState == 1 or playState == 5 then
curPos = reaper.GetPlayPositionEx(0)
else
curPos = reaper.GetCursorPosition()
end

if curPos < startTSgrid or curPos > endTSgrid then
local contScroll = reaper.GetToggleCommandState(41817)* -1 +1
Expand Down Expand Up @@ -111,4 +105,3 @@ else
reaper.defer(function()end)
end


0 comments on commit 92caaaf

Please sign in to comment.