On Mac the first visible line needs to be recalculated after the Scroll because it can be set
to the wrong value in Scroll because of the paint event generated by the Update() there. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0f1b6d7b58
commit
35a7f94b94
@ -3296,6 +3296,17 @@ void wxListMainWindow::MoveToItem(size_t item)
|
||||
Scroll( -1, rect.y / hLine );
|
||||
if (rect.y + rect.height + 5 > view_y + client_h)
|
||||
Scroll( -1, (rect.y + rect.height - client_h + hLine) / hLine );
|
||||
|
||||
#ifdef __WXMAC__
|
||||
// At least on Mac the visible lines value will get reset inside of
|
||||
// Scroll *before* it actually scrolls the window because of the
|
||||
// Update() that happens there, so it will still have the wrong value.
|
||||
// So let's reset it again and wait for it to be recalculated in the
|
||||
// next paint event. I would expect this problem to show up in wxGTK
|
||||
// too but couldn't duplicate it there. Perhaps the order of events
|
||||
// is different... --Robin
|
||||
ResetVisibleLinesRange();
|
||||
#endif
|
||||
}
|
||||
else // !report
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user