X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/887b919bde47aeab043506e220be25d4d293afaf..0995b9dc18a7ce898c1c1be0e2790b258cab0fee:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 89c08e18c6..bcf799a00b 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1046,7 +1046,7 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) // NB: The code below is not really Mac-specific, but since we are close // to 2.8 release and I don't have time to test on other platforms, I -// defined this only for wxMac. If this behavior is desired on +// defined this only for wxMac. If this behaviour is desired on // other platforms, please go ahead and revise or remove the #ifdef. #ifdef __WXMAC__ if ( !m_owner->IsVirtual() && (item.m_mask & wxLIST_MASK_STATE) && @@ -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 );