From: Vadim Zeitlin Date: Fri, 6 Dec 2002 23:40:11 +0000 (+0000) Subject: avoid flicker when doing SetItem() in non report mode (slightly extended patch 647970) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/285013b384ca240417b05246d39c1e93bd7883e0 avoid flicker when doing SetItem() in non report mode (slightly extended patch 647970) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 51f600fa5b..85505af13f 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -3806,16 +3806,10 @@ void wxListMainWindow::SetItem( wxListItem &item ) line->SetItem( item.m_col, item ); } - if ( InReportView() ) - { - // just refresh the line to show the new value of the text/image - RefreshLine((size_t)id); - } - else // !report - { - // refresh everything (resulting in horrible flicker - FIXME!) - m_dirty = TRUE; - } + // update the item on screen + wxRect rectItem; + GetItemRect(id, rectItem); + RefreshRect(rectItem); } void wxListMainWindow::SetItemState( long litem, long state, long stateMask )