]> git.saurik.com Git - wxWidgets.git/commitdiff
wxListCtrl sends event directly again. Also fixed problem
authorRobert Roebling <robert@roebling.de>
Tue, 7 Dec 1999 15:47:55 +0000 (15:47 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 7 Dec 1999 15:47:55 +0000 (15:47 +0000)
    of list otem status not being up-to-date when events
    get sent.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 032bb8344b28a71d3d53be5b562269cd3e82c357..30ef6ea2a6c313fd6bced1f13e764bb31f078077 100644 (file)
@@ -710,11 +710,11 @@ void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
 void wxListLineData::Hilight( bool on )
 {
     if (on == m_hilighted) return;
+    m_hilighted = on;
     if (on)
         m_owner->SelectLine( this );
     else
         m_owner->DeselectLine( this );
-    m_hilighted = on;
 }
 
 void wxListLineData::ReverseHilight( void )
@@ -1258,8 +1258,8 @@ void wxListMainWindow::SendNotify( wxListLineData *line, wxEventType command )
     le.SetEventObject( GetParent() );
     le.m_itemIndex = GetIndexOfLine( line );
     line->GetItem( 0, le.m_item );
-//    GetParent()->GetEventHandler()->ProcessEvent( le );
-    GetParent()->GetEventHandler()->AddPendingEvent( le );
+    GetParent()->GetEventHandler()->ProcessEvent( le );
+//    GetParent()->GetEventHandler()->AddPendingEvent( le );
 }
 
 void wxListMainWindow::FocusLine( wxListLineData *WXUNUSED(line) )