]> git.saurik.com Git - wxWidgets.git/commitdiff
don't return items which are not visible from DoHitTest() (patch 1448508)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 16 Apr 2006 23:41:52 +0000 (23:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 16 Apr 2006 23:41:52 +0000 (23:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/listbox.cpp

index fbe7e88e41ad35fc2d3d4fec6555847c560a04ec..a0d65e54010ede4254116fd562fecb2d25c07487 100644 (file)
@@ -1000,6 +1000,11 @@ void wxListBox::DoSetFirstItem( int n )
 
 int wxListBox::DoListHitTest(const wxPoint& point) const
 {
+    // gtk_tree_view_get_path_at_pos() also gets items that are not visible and
+    // we only want visible items we need to check for it manually here
+    if ( !GetClientRect().Inside(point) )
+        return wxNOT_FOUND;
+
     // need to translate from master window since it is in client coords
     gint binx, biny;
     gdk_window_get_geometry(gtk_tree_view_get_bin_window(m_treeview),