Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BR_GetMouseCursorContext starts spamming "Toggle Master track visible" #837

Closed
jalovatt opened this issue Mar 12, 2017 · 1 comment
Closed

BR_GetMouseCursorContext starts spamming "Toggle Master track visible" #837

jalovatt opened this issue Mar 12, 2017 · 1 comment

Comments

@jalovatt
Copy link

@jalovatt jalovatt commented Mar 12, 2017

I'm calling it from a Lua script. In a fresh Reaper session with no tracks, I can reproduce it consistently.

Reaper 5.33 x64, Windows 8.1

br context master spam

gfx.init("", 200, 200, 0, 200, 200)

local function Main()
	
	local char = gfx.getchar()
	if char == -1 or char == 27 then
		return 0
	end
	
	--local wnd, seg, det = "a", "b", "c"   -- <- this code works
	local wnd, seg, det = reaper.BR_GetMouseCursorContext()  -- <- this code doesn't
	
	local str = (not wnd or wnd == "unknown") 
				and	"- No context -"
				or	wnd..
						(not not seg and (" | "..seg..
							(not not det and (" | "..det))))
							
	if string.sub(str, -2) == "| " then str = string.sub(str, 1, -4) end
	
	gfx.x, gfx.y = 10, 10
	gfx.drawstr(str)
	
	gfx.update()
	
	reaper.defer(Main)
	
end

Main()
cfillion added a commit to cfillion/sws that referenced this issue Mar 12, 2017
This got broken since REAPER v5.15 because PreventUIRefresh was used before SetMasterTrackVisibility.
@swstim
Copy link
Member

@swstim swstim commented Mar 14, 2017

Fixed in latest pre (2.9.0). Thanks @cfillion!

@swstim swstim closed this Mar 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.