From ebf82d2b4b8790a3f216f94acd56cbed07e8915a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 3 Aug 2008 12:15:30 +0000 Subject: [PATCH] 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 --- src/generic/listctrl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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(); -- 2.45.2