Commit c47c62a8 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

comctl32: Don't invalidate item in LISTVIEW_SetItemT when its state has not changed.

parent 315599c6
......@@ -4401,14 +4401,15 @@ static BOOL LISTVIEW_SetItemT(LISTVIEW_INFO *infoPtr, LVITEMW *lpLVItem, BOOL is
HWND hwndSelf = infoPtr->hwndSelf;
LPWSTR pszText = NULL;
BOOL bResult, bChanged = FALSE;
RECT oldItemArea;
TRACE("(lpLVItem=%s, isW=%d)\n", debuglvitem_t(lpLVItem, isW), isW);
if (!lpLVItem || lpLVItem->iItem < 0 || lpLVItem->iItem >= infoPtr->nItemCount)
return FALSE;
/* Invalidate old item area */
LISTVIEW_InvalidateItem(infoPtr, lpLVItem->iItem);
/* Store old item area */
LISTVIEW_GetItemBox(infoPtr, lpLVItem->iItem, &oldItemArea);
/* For efficiency, we transform the lpLVItem->pszText to Unicode here */
if ((lpLVItem->mask & LVIF_TEXT) && is_text(lpLVItem->pszText))
......@@ -4436,7 +4437,10 @@ static BOOL LISTVIEW_SetItemT(LISTVIEW_INFO *infoPtr, LVITEMW *lpLVItem, BOOL is
lpLVItem->iSubItem > 0 && lpLVItem->iSubItem <= DPA_GetPtrCount(infoPtr->hdpaColumns) )
LISTVIEW_InvalidateSubItem(infoPtr, lpLVItem->iItem, lpLVItem->iSubItem);
else
{
LISTVIEW_InvalidateRect(infoPtr, &oldItemArea);
LISTVIEW_InvalidateItem(infoPtr, lpLVItem->iItem);
}
}
/* restore text */
if (pszText)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment