]> git.saurik.com Git - wxWidgets.git/commitdiff
minor cleanup
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 30 Oct 2001 13:56:40 +0000 (13:56 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 30 Oct 2001 13:56:40 +0000 (13:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 35d5d712b8ab4183277220b46443f4be0e1d9b5f..b4c6644be48382e2adeea25a5cf481bab209498f 100644 (file)
@@ -3242,7 +3242,8 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
         nevent.SetDirection( !event.ShiftDown() );
         nevent.SetEventObject( GetParent()->GetParent() );
         nevent.SetCurrentFocus( m_parent );
-        if (GetParent()->GetParent()->GetEventHandler()->ProcessEvent( nevent )) return;
+        if (GetParent()->GetParent()->GetEventHandler()->ProcessEvent( nevent ))
+            return;
     }
 
     /* no item -> nothing to do */
@@ -3342,12 +3343,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
         case WXK_SPACE:
             if ( IsSingleSel() )
             {
-                wxListEvent le( wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
-                                GetParent()->GetId() );
-                le.SetEventObject( GetParent() );
-                le.m_itemIndex = m_current;
-                GetLine(m_current)->GetItem( 0, le.m_item );
-                GetParent()->GetEventHandler()->ProcessEvent( le );
+                SendNotify( m_current, wxEVT_COMMAND_LIST_ITEM_ACTIVATED );
 
                 if ( IsHighlighted(m_current) )
                 {
@@ -3362,14 +3358,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event )
 
         case WXK_RETURN:
         case WXK_EXECUTE:
-            {
-                wxListEvent le( wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
-                                GetParent()->GetId() );
-                le.SetEventObject( GetParent() );
-                le.m_itemIndex = m_current;
-                GetLine(m_current)->GetItem( 0, le.m_item );
-                GetParent()->GetEventHandler()->ProcessEvent( le );
-            }
+            SendNotify( m_current, wxEVT_COMMAND_LIST_ITEM_ACTIVATED );
             break;
 
         default: