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

Pre-release 2.13.0.0 breaks script that used to work with 2.10.0.0 (zooming actions) #1395

Closed
Breeder opened this issue Jul 9, 2020 · 4 comments · Fixed by #1412
Closed
Assignees

Comments

@Breeder
Copy link
Contributor

Breeder commented Jul 9, 2020

This is the script, it's called 'Zoom - Toggle full zoom to selected items, automation items and selected points in active envelope (time selection or full project if no selection)'

https://pastebin.com/JuX1baXA

When zooming to items, something gets wrong with scroll position. The script is using SWS actions to zoom selected tracks. I tried removing obvious things like PreventUIRefresh() but still no luck.

@Breeder
Copy link
Contributor Author

Breeder commented Jul 9, 2020

I know there were some recent fixes to zooming code when it comes to envelopes (SWS/wol part of the code) so maybe that's where the bug happened? I think cfillion did these envelope fixes? Maybe he can get to the bottom of this? I mean, the script is simple, it simply saves track selection, selects new tracks, zooms to them (using SWS actions) and then restores track selection.

The horizontal zoom part of the script works, it's the vertical zooming that seems to be affected by the recent changes (lines 388 to 454 of the script from the first post of this issue)

@cfillion
Copy link
Member

cfillion commented Jul 9, 2020

Can you share duplication steps and details on the scroll position you're getting now vs before? At first glance that script appears to be working here with SWS 2.12.0 in REAPER 6.12 on macOS&Windows: https://i.imgur.com/KGlfu6X.gif (same with 2.10.0).

@Breeder
Copy link
Contributor Author

Breeder commented Jul 9, 2020

Ah, sorry, it has something to do with cycle actions!!!!

I use cycle action to wrap this script, this is the cycle action (so it reports proper toggle state as a toolbar button and also works in tandem with other zooming actions so they all respect each other toggle state):
https://stash.reaper.fm/39948/Screenshot%202020-07-09%2013.35.21.png

Can you try with this project (item and track selection are different at purpose)
https://stash.reaper.fm/39947/test.rpp

2.10. result:
https://stash.reaper.fm/39949/Screenshot%202020-07-09%2013.32.54.png
2.13 result:
https://stash.reaper.fm/39950/Screenshot%202020-07-09%2013.38.08.png

@cfillion
Copy link
Member

cfillion commented Jul 10, 2020

Confirmed, this can be duplicated by running "SWS: Vertical zoom to selected tracks" while PreventUIRefresh is active. The track's I_WNDH does not get updated between the zoom and scroll steps via TrackList_AdjustWindows.

I'll see if there's a way to have REAPER refresh the height synchronously. Otherwise, I think the second best solution would be to make PreventUIRefresh an option in the cycle action editor rather than always enable it. (In which case, those vertical zoom actions still won't work with PreventUIRefresh enabled, but that never worked before anyway.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants