]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed wxListMainWindow::HitTest
authorUnknown (NI) <nobody@localhost>
Sun, 19 Mar 2000 02:10:09 +0000 (02:10 +0000)
committerUnknown (NI) <nobody@localhost>
Sun, 19 Mar 2000 02:10:09 +0000 (02:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 128c1fc02759f4fec5cecfc28a9e051d5fc511c0..5fa1ff040b1645ca8304f870023bf0cbe4fc5e49 100644 (file)
@@ -2832,12 +2832,17 @@ long wxListMainWindow::FindItem(long start, long data)
 
 long wxListMainWindow::HitTest( int x, int y, int &flags )
 {
+    wxClientDC dc(this);
+    PrepareDC(dc);
+    wxCoord cx = dc.DeviceToLogicalX( x );
+    wxCoord cy = dc.DeviceToLogicalY( y );
+
     wxNode *node = m_lines.First();
     int count = 0;
     while (node)
     {
         wxListLineData *line = (wxListLineData*)node->Data();
-        long ret = line->IsHit( x, y );
+        long ret = line->IsHit( cx, cy );
         if (ret & flags)
         {
             flags = (int)ret;