From efad36b8e9eb3266e1050a746d8d87fa87177ec6 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 11 Sep 2000 16:28:34 +0000 Subject: [PATCH] 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 --- src/generic/listctrl.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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(); -- 2.45.2