The height of the items of the generic wxListCtrl remained too small if an
image of a greater than standard size was used.
Fix this by forcing the line height recalculation when adding an item using an
image higher than the current line height.
Closes #12806.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67615
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
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 );