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();