From: Robert Roebling Date: Mon, 11 Sep 2000 16:28:34 +0000 (+0000) Subject: Tiny patch for wxListCtrl::HitTest(). I didn't X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/efad36b8e9eb3266e1050a746d8d87fa87177ec6 Tiny patch for wxListCtrl::HitTest(). I didn't even test if it compiles, oh dear. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 12a4d8d42e..8540ca21c1 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -730,6 +730,23 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing ) m_bound_all.width = 0; m_bound_all.height = 0; wxNode *node = m_items.First(); + if (node) + { + wxListItemData *item = (wxListItemData*)node->Data(); + if (item->HasImage()) + { + int w = 0; + int h = 0; + m_owner->GetImageSize( item->GetImage(), w, h ); + m_bound_icon.width = w; + m_bound_icon.height = h; + } + else + { + m_bound_icon.width = 0; + m_bound_icon.height = 0; + } + } while (node) { wxListItemData *item = (wxListItemData*)node->Data();