View Single Post
Old 01-23-2024, 01:05 AM   #19
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,450
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@kovid: although I can't reproduce it, given what BR says I suspect it is related to setting the current index to row zero in init.finalize_layout(). It does it by setting a oneshot timer(0). This introduces a possible timing issue with ui.post_initialize_actions(). Which of the two goes first, and is the answer deterministic? You can see when the timers fire by when the selected book jumps, changing the book in book details. In BR's case the book jumps but book details isn't changed. The jump is caused by the timer. The selection for book details is inline, not in the timer method.

I tried moving the code to set the current row to zero from finalize_layout() to post_initialize_actions(). Nothing broke. Of course, nothing was fixed either.

Also, the view manager will "do its thing" at .initialization_complete(). which happens before the oneshots are processed. I don't know if that could confuse things, in particular the choosing of the currently selected row and the signals related to book details.
chaley is offline   Reply With Quote