]> git.saurik.com Git - wxWidgets.git/commitdiff
We need one float argument to perform floating point division.
authorWłodzimierz Skiba <abx@abx.art.pl>
Mon, 9 Aug 2004 17:10:18 +0000 (17:10 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Mon, 9 Aug 2004 17:10:18 +0000 (17:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 6e989ae648d2f18c2d5c2ca56b0697a0ddcfef08..ee4d53272ecb00ffd9d8933144f532e8576c61bd 100644 (file)
@@ -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;