We need one float argument to perform floating point division.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
defc0789c1
commit
9da89d3100
@ -4299,7 +4299,7 @@ long wxListMainWindow::FindItem( const wxPoint& pt )
|
||||
GetItemPosition( GetItemCount()-1, p );
|
||||
if( p.y == 0 )
|
||||
return topItem;
|
||||
long id = (long) floor( pt.y*(GetItemCount()-topItem-1)/p.y+topItem );
|
||||
long id = (long) floor( pt.y*double(GetItemCount()-topItem-1)/p.y+topItem );
|
||||
if( id >= 0 && id < (long)GetItemCount() )
|
||||
return id;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user