git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10947
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
int y = event.GetY();
CalcUnscrolledPosition( x, y, &x, &y );
int y = event.GetY();
CalcUnscrolledPosition( x, y, &x, &y );
- /* Did we actually hit an item ? */
+ // where did we hit it (if we did)?
long hitResult = 0;
size_t count = GetItemCount(),
long hitResult = 0;
size_t count = GetItemCount(),
if ( HasFlag(wxLC_REPORT) )
{
current = y / GetLineHeight();
if ( HasFlag(wxLC_REPORT) )
{
current = y / GetLineHeight();
- hitResult = HitTestLine(current, x, y);
+ if ( current < count )
+ hitResult = HitTestLine(current, x, y);