git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6181 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
             if ( GetRowBottom(row) < top )
                 continue;
 
             if ( GetRowBottom(row) < top )
                 continue;
 
-            if ( GetRowTop(top) > bottom )
+            if ( GetRowTop(row) > bottom )
                 break;
 
             m_rowLabelsExposed.Add( row );
                 break;
 
             m_rowLabelsExposed.Add( row );
     int i;
     for ( i = 0; i < m_numRows; i++ )
     {
     int i;
     for ( i = 0; i < m_numRows; i++ )
     {
-        int bottom = GetRowBottom(i) - 1;
+        int bot = GetRowBottom(i) - 1;
-            dc.DrawLine( left, bottom, right, bottom );
+            dc.DrawLine( left, bot, right, bot );