]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
Rework the GTK WebKit backend history to remove the need for the map between wxWebHis...
[wxWidgets.git] / src / generic / listctrl.cpp
index 0c877f3b0ccd3c100d538c9054000e6f317014d5..bcf799a00be753f2bc56d1d6ab03cf6623f32316 100644 (file)
@@ -4027,6 +4027,19 @@ void wxListMainWindow::InsertItem( wxListItem &item )
     wxListLineData *line = new wxListLineData(this);
 
     line->SetItem( item.m_col, item );
+    if ( item.m_mask & wxLIST_MASK_IMAGE )
+    {
+        // Reset the buffered height if it's not big enough for the new image.
+        if (m_small_image_list)
+        {
+            int imageWidth, imageHeight;
+            m_small_image_list->GetSize(item.GetImage(),
+                                        imageWidth, imageHeight);
+
+            if ( imageHeight > m_lineHeight )
+                m_lineHeight = 0;
+        }
+    }
 
     m_lines.Insert( line, id );