Closed X-Raym closed 3 months ago
In which case does the SWS Notes window not correctly refresh by itself? That sounds like the root cause that should be fixed instead of adding a manual refresh function...
Basically, when the source of what it displays change by scripting. Region Subs, Markers Subs have their refresh function. But Items Notes doesnt seems to have it. I had to click on anothet item and get back to original one to refresh an item altered woth GetSetMediaItemInfo_Strong P_NOTES.
Here is a demo:
item = reaper.GetSelectedMediaItem(0,0)
str = ""A""
reaper.GetSetMediaItemInfo_String( item, "P_NOTES", str, true )
reaper.UpdateArrange()
reaper.UpdateTimeline()
As you can see, SWS Notes window also dont refresh automatically when modifying the source properties, even with native editing.
Note: I dont know how and why but it seems to work with your interactive reascript console:
I wonder what function is used in your script to allow such refreshing from script side
Oh, I checked your script and it seems the trick is this:
reaper.TrackList_AdjustWindows(false)
reaper.UpdateArrange()
This update notes window when using reascript.
Well, I guess we can close this then, unless we found a case where this doesnt work (havent tried with projectnotes and extra project notes)
Hi,
We have reaper.NF_UpdateSWSMarkerRegionSubWindow() to refresh the SWS notes window, but these doesnt work in other cases (item notes for eg).
Would be nice to have a generic Refresh SWS Notes window function.
Not too high priority.
Best,