comctl32/listview: Setting item text to callback stub value already having it raises item-change notifications.
Use same new text comparison rules for both items and subitems. Based on patch by Stefan Stranz.
This commit is contained in:
parent
47bc142dad
commit
7f936a0a6e
|
@ -507,7 +507,7 @@ static inline int textcmpWT(LPCWSTR aw, LPCWSTR bt, BOOL isW)
|
|||
if (!aw) return bt ? -1 : 0;
|
||||
if (!bt) return aw ? 1 : 0;
|
||||
if (aw == LPSTR_TEXTCALLBACKW)
|
||||
return bt == LPSTR_TEXTCALLBACKW ? 0 : -1;
|
||||
return bt == LPSTR_TEXTCALLBACKW ? 1 : -1;
|
||||
if (bt != LPSTR_TEXTCALLBACKW)
|
||||
{
|
||||
LPWSTR bw = textdupTtoW(bt, isW);
|
||||
|
@ -3727,8 +3727,7 @@ static BOOL set_sub_item(const LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem,
|
|||
*bChanged = TRUE;
|
||||
}
|
||||
|
||||
if (lpLVItem->mask & LVIF_TEXT)
|
||||
if (lpSubItem->hdr.pszText != lpLVItem->pszText)
|
||||
if ((lpLVItem->mask & LVIF_TEXT) && textcmpWT(lpSubItem->hdr.pszText, lpLVItem->pszText, isW))
|
||||
{
|
||||
textsetptrT(&lpSubItem->hdr.pszText, lpLVItem->pszText, isW);
|
||||
*bChanged = TRUE;
|
||||
|
|
|
@ -1118,7 +1118,7 @@ static void test_items(void)
|
|||
expect(TRUE, r);
|
||||
|
||||
ok_sequence(sequences, PARENT_SEQ_INDEX, textcallback_set_again_parent_seq,
|
||||
"check callback text comparison rule", TRUE);
|
||||
"check callback text comparison rule", FALSE);
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue