]> git.saurik.com Git - wxWidgets.git/commitdiff
fix view rectangle calculation for the control with scrollbars (#9467)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 3 Aug 2008 12:15:30 +0000 (12:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 3 Aug 2008 12:15:30 +0000 (12:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 60540ba6b73c536261c484703b4cf59d0e65a461..4486e729b2790ebfc6935b4dc65fb1ac248f41e6 100644 (file)
@@ -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();