reaper-oss / sws

The SWS extension is a collection of features that seamlessly integrate into REAPER, the Digital Audio Workstation (DAW) software by Cockos, Inc
https://www.sws-extension.org/
MIT License
448 stars 85 forks source link

Contextual toolbars bug with extendend region/marker/tempo lane #916

Open renothestraws opened 6 years ago

renothestraws commented 6 years ago

Hello WIth reaper v5.65 pre and the resizing region/marker/tempo lane, the concerned contexts are now erratic depending on the size of the lane

Same problem with API -> BR_GetMouseCursorContext

cfillion commented 6 years ago

Confirmed. The culprit seems to be this function which makes a lot of assumptions on the height of each lanes: https://github.com/reaper-oss/sws/blob/400c3c13949805afc37b87627a0c8664f436508f/Breeder/BR_MouseUtil.cpp#L1479

cfillion commented 6 years ago

I think I have a fix for this (it still makes assumptions though, but there's no other way).

Can you test using this build @renothestraws? https://cfillion.ca/files/sws/dynamic-ruler-height/

renothestraws commented 6 years ago

Work as a charm in a script using

BR_GetMouseCursorContext

WOrk great as well with contextual toolbars!

THank you!

nofishonfriday commented 4 years ago

@cfillion Trying to clean up old issues, I seem to remember this was merged but couldn't find a merge commit..

cfillion commented 4 years ago

If I remember right, a later REAPER pre-release changed once again how the lane heights are calculated and I couldn't find a way to reproduce it in a pixel-perfect way.