X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/35a7f94b940c450206190b7ca2fe4135f006c46c..cba7320c9cb0774cacf7001960af3b4bd13f9a9c:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index b316c39ea9..fbb923ae18 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1541,11 +1541,7 @@ void wxListLineData::DrawInReportMode( wxDC *dc, if (highlighted) { int flags = wxCONTROL_SELECTED; - if (m_owner->HasFocus() -#ifdef __WXMAC__ - && IsControlActive( (ControlRef)m_owner->GetHandle() ) -#endif - ) + if (m_owner->HasFocus()) flags |= wxCONTROL_FOCUSED; wxRendererNative::Get().DrawItemSelectionRect( m_owner, *dc, rectHL, flags ); } @@ -2869,9 +2865,10 @@ void wxListMainWindow::HighlightAll( bool on ) RefreshLine(m_current); } } - else // multi sel + else // multi selection { - HighlightLines(0, GetItemCount() - 1, on); + if ( !IsEmpty() ) + HighlightLines(0, GetItemCount() - 1, on); } } @@ -3028,7 +3025,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) if (event.RightDown()) { SendNotify( (size_t)-1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); - + wxContextMenuEvent evtCtx( wxEVT_CONTEXT_MENU, GetParent()->GetId(), @@ -3111,7 +3108,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) if (event.RightDown()) { SendNotify( (size_t) -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); - + wxContextMenuEvent evtCtx( wxEVT_CONTEXT_MENU, GetParent()->GetId(),