X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7451b5c459fc53b98f292e7442d36273e00c26af..50e55c13ea2da06b1b03069673ae45edd780fc99:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index ddb6197f07..481654ecd8 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -3181,10 +3181,14 @@ void wxListMainWindow::SetItem( wxListItem &item ) } } - // update the item on screen - wxRect rectItem; - GetItemRect(id, rectItem); - RefreshRect(rectItem); + // update the item on screen unless we're going to update everything soon + // anyhow + if ( !m_dirty ) + { + wxRect rectItem; + GetItemRect(id, rectItem); + RefreshRect(rectItem); + } } void wxListMainWindow::SetItemStateAll(long state, long stateMask) @@ -3660,11 +3664,15 @@ void wxListMainWindow::RecalculatePositions(bool noRefresh) || i == count - 1) { // Adjust all items in this row to have the same - // width to ensure that they all align horizontally. - size_t firstRowLine = i - currentlyVisibleLines + 1; - for (size_t j = firstRowLine; j <= i; j++) + // width to ensure that they all align horizontally in + // icon view. + if ( HasFlag(wxLC_ICON) || HasFlag(wxLC_SMALL_ICON) ) { - GetLine(j)->m_gi->ExtendWidth(maxWidthInThisRow); + size_t firstRowLine = i - currentlyVisibleLines + 1; + for (size_t j = firstRowLine; j <= i; j++) + { + GetLine(j)->m_gi->ExtendWidth(maxWidthInThisRow); + } } currentlyVisibleLines = 0;