From: Vadim Zeitlin Date: Sun, 3 Aug 2008 12:15:30 +0000 (+0000) Subject: fix view rectangle calculation for the control with scrollbars (#9467) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ebf82d2b4b8790a3f216f94acd56cbed07e8915a fix view rectangle calculation for the control with scrollbars (#9467) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 60540ba6b7..4486e729b2 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -4104,8 +4104,9 @@ wxRect wxListMainWindow::GetViewRect() const { for ( int i = 0; i < count; i++ ) { - wxRect r; - GetItemRect(i, r); + // we need logical, not physical, coordinates here, so use + // GetLineRect() instead of GetItemRect() + wxRect r = GetLineRect(i); wxCoord x = r.GetRight(), y = r.GetBottom();