]> git.saurik.com Git - wxWidgets.git/commitdiff
Tiny patch for wxListCtrl::HitTest(). I didn't
authorRobert Roebling <robert@roebling.de>
Mon, 11 Sep 2000 16:28:34 +0000 (16:28 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 11 Sep 2000 16:28:34 +0000 (16:28 +0000)
    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

index 12a4d8d42ecf606fec4a85fe59fcb255c27fda37..8540ca21c1a6386bb232e99d7743236f00e68bf8 100644 (file)
@@ -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();