]> git.saurik.com Git - wxWidgets.git/commitdiff
fix to avoid internal compiler error with gcc 2.95.2 on Alpha
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 12 Oct 2001 14:16:20 +0000 (14:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 12 Oct 2001 14:16:20 +0000 (14:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index c19161b5c2981ecd170ed82c7c7d5a82966d1656..69f4d47a54374056aa271e72e042151fda68882e 100644 (file)
@@ -1879,7 +1879,7 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
 
     int numColumns = m_owner->GetColumnCount();
     wxListItem item;
-    for (int i = 0; i < numColumns; i++)
+    for ( int i = 0; i < numColumns && x < w; i++ )
     {
         m_owner->GetColumn( i, item );
         int wCol = item.m_width;
@@ -1923,11 +1923,9 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
         dc.DrawText( item.GetText(),
                      x + EXTRA_WIDTH, HEADER_OFFSET_Y + EXTRA_HEIGHT );
 
-        if ( x > w - wCol + 5 )
-            break;
-
         x += wCol;
     }
+
     dc.EndDrawing();
 }