From 00a6c15a74b28069b603556e2a0c0f86d7bcaaf8 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/branches/WX_2_8_BRANCH@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 1a29e04146..078c8e3c7d 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -4134,8 +4134,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();