Make sure mouse events are only sent in the case of the native control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier 2006-12-31 06:03:51 +00:00
parent 7528971e6b
commit 1a4b6b97b1

View File

@ -622,12 +622,14 @@ void wxListCtrl::OnDblClick(wxMouseEvent& event)
#if wxABI_VERSION >= 20801
void wxListCtrl::OnRightDown(wxMouseEvent& event)
{
if (m_dbImpl)
FireMouseEvent(wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition());
event.Skip();
}
void wxListCtrl::OnMiddleDown(wxMouseEvent& event)
{
if (m_dbImpl)
FireMouseEvent(wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, event.GetPosition());
event.Skip();
}
@ -656,6 +658,8 @@ void wxListCtrl::FireMouseEvent(wxEventType eventType, wxPoint position)
void wxListCtrl::OnChar(wxKeyEvent& event)
{
if (m_dbImpl)
{
wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetId() );
le.SetEventObject(this);
le.m_code = event.GetKeyCode();
@ -671,6 +675,7 @@ void wxListCtrl::OnChar(wxKeyEvent& event)
}
GetEventHandler()->ProcessEvent(le);
}
}
event.Skip();
}
#endif