View Single Post
Old 04-26-2015, 05:26 PM   #4
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

Quote:
Originally Posted by Triode View Post
Also what happens if you use this pair of scripts in nested scripts so that you get two Prevents occurring and then two restores? I think I might be seeing some strange partial restore behaviour.
And that's why I believe this function (PreventUIRefresh) uses integer instead of boolean.

So calling PreventUIRefresh(1) twice will work all right if you call PreventUIRefresh(-1) twice (or PreventUIRefresh(-2) once ) after that. It seems that the important thing is that you set internal counter back to 0 after you're done with it (consequently, UI will not refresh until that counter is set to 0)

Quote:
Originally Posted by Triode View Post
It doesn't work on some of my scripts. For instance this one:
Prevent UI Refresh
SWS: Save current track selection
Track: Select All Tracks
SWS: Vertical zoom to selected track(s), minimize others
SWS: Restore saved track selection
Prevent UI Refresh Restore
I think that's purely due to the way these SWS actions work (I guess SWS: Vertical zoom to selected track(s), minimize others is at fault here)...nothing you can do about it really except find the action at fault, report it on our GitHub issue tracker and hope someone takes a look

Last edited by Breeder; 04-26-2015 at 05:33 PM.
Breeder is offline   Reply With Quote