]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
added reference to the bug in case somebody wanted to remove this
[wxWidgets.git] / src / generic / listctrl.cpp
index e2859684843794bbc90d8fa53123c88d73e5ccbc..dbd275f0488be95c6147fd002692c8fb7635ca84 100644 (file)
@@ -2698,22 +2698,18 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
         }
     }
 
+#ifndef __WXMAC__
+    // Don't draw rect outline under Mac at all.
     if ( HasCurrent() )
     {
-        // don't draw rect outline under Max if we already have the background
-        // color but under other platforms only draw it if we do: it is a bit
-        // silly to draw "focus rect" if we don't have focus!
-#ifdef __WXMAC__
-        if ( !m_hasFocus )
-#else // !__WXMAC__
         if ( m_hasFocus )
-#endif // __WXMAC__/!__WXMAC__
         {
             dc.SetPen( *wxBLACK_PEN );
             dc.SetBrush( *wxTRANSPARENT_BRUSH );
             dc.DrawRectangle( GetLineHighlightRect(m_current) );
         }
     }
+#endif
 
     dc.EndDrawing();
 }
@@ -3069,6 +3065,9 @@ void wxListMainWindow::OnArrowChar(size_t newCurrent, const wxKeyEvent& event)
     {
         ChangeCurrent(newCurrent);
 
+        // refresh the old focus to remove it
+        RefreshLine( oldCurrent );
+
         // select all the items between the old and the new one
         if ( oldCurrent > newCurrent )
         {
@@ -3085,7 +3084,7 @@ void wxListMainWindow::OnArrowChar(size_t newCurrent, const wxKeyEvent& event)
             HighlightAll(FALSE);
 
         ChangeCurrent(newCurrent);
-
+        
         // refresh the old focus to remove it
         RefreshLine( oldCurrent );
 
@@ -3094,7 +3093,7 @@ void wxListMainWindow::OnArrowChar(size_t newCurrent, const wxKeyEvent& event)
             HighlightLine( m_current, TRUE );
         }
     }
-
+       
     RefreshLine( m_current );
 
     MoveToFocus();