When call EnsureVisible in wxUniv, make sure reset visible lines range correctly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2646,7 +2646,7 @@ void wxListMainWindow::MoveToItem(size_t item)
|
|||||||
if (rect.y + rect.height + 5 > view_y + client_h)
|
if (rect.y + rect.height + 5 > view_y + client_h)
|
||||||
GetListCtrl()->Scroll( -1, (rect.y + rect.height - client_h + hLine) / hLine );
|
GetListCtrl()->Scroll( -1, (rect.y + rect.height - client_h + hLine) / hLine );
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#if defined(__WXMAC__) || defined(__WXUNIVERSAL__)
|
||||||
// At least on Mac the visible lines value will get reset inside of
|
// At least on Mac the visible lines value will get reset inside of
|
||||||
// Scroll *before* it actually scrolls the window because of the
|
// Scroll *before* it actually scrolls the window because of the
|
||||||
// Update() that happens there, so it will still have the wrong value.
|
// Update() that happens there, so it will still have the wrong value.
|
||||||
@@ -2654,6 +2654,7 @@ void wxListMainWindow::MoveToItem(size_t item)
|
|||||||
// next paint event. I would expect this problem to show up in wxGTK
|
// 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
|
// too but couldn't duplicate it there. Perhaps the order of events
|
||||||
// is different... --Robin
|
// is different... --Robin
|
||||||
|
// Same in wxUniv/X11
|
||||||
ResetVisibleLinesRange();
|
ResetVisibleLinesRange();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -2696,7 +2697,7 @@ bool wxListMainWindow::ScrollList(int WXUNUSED(dx), int dy)
|
|||||||
|
|
||||||
GetListCtrl()->Scroll(-1, top + dy / hLine);
|
GetListCtrl()->Scroll(-1, top + dy / hLine);
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#if defined(__WXMAC__) || defined(__WXUNIVERSAL__)
|
||||||
// see comment in MoveToItem() for why we do this
|
// see comment in MoveToItem() for why we do this
|
||||||
ResetVisibleLinesRange();
|
ResetVisibleLinesRange();
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user