browngraphicslab / NuSys

0 stars 0 forks source link

List scroll-to bug #1595

Closed tdgreen closed 7 years ago

tdgreen commented 7 years ago

post beta: Scroll to scrolls, but adding a new element doesn't truly initialize that new element until the next pass of the game thread. Its an async issue that means when we call scroll-to after adding a new element to a list, it scrolls first and then adds. Instead, make scroll-to ( as well as the code in the 'CreateListViewRowUIElements' method ) happen from the update call but be called only when a flag has been set. In other words, 'scroll-to' shouldn't actually scroll to anything, but should just set flags. Same with the 'CreateListViewRowUIElements' method which shouldn't run something on the game thread, but should rather set a flag so that the update call does the appropriate logic. This way we can intentionally synchronize the order of functions and scroll to elements after adding them

murrayLuke commented 7 years ago

Wow thank you for figuring this one out Trent.