Skip mouse events outside of item area in wxDataViewCtrl.

Don't consume mouse events outside of the area occupied by the items in the
generic implementation of wxDataViewCtrl as this prevented wxEVT_CONTEXT_MENU
events from being generated.

Closes #12706.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-11-24 00:42:19 +00:00
parent 63a6a75000
commit 737883f20a

View File

@@ -3469,13 +3469,17 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
xpos += c->GetWidth();
}
if (!col)
{
event.Skip();
return;
}
wxDataViewRenderer *cell = col->GetRenderer();
unsigned int current = GetLineAt( y );
if ((current >= GetRowCount()) || (x > GetEndOfLastCol()))
{
// Unselect all if below the last row ?
event.Skip();
return;
}