Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
Fixed LISTVIEW_GetItemChanges() to perform a more complete comparison between lpItem and lpLVItem. Now compares the pszText string of the lpItem and lpLVItem structs. Fixes a bug where the old and new item have the same attributes but their text differs and GetItemChanges() compares them as equal.
This commit is contained in:
parent
93c68a7ed6
commit
eab73f89ec
|
@ -1205,10 +1205,33 @@ static UINT LISTVIEW_GetItemChanges(LISTVIEW_ITEM *lpItem, LPLVITEMA lpLVItem)
|
|||
{
|
||||
uChanged |= LVIF_TEXT;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lpLVItem->pszText)
|
||||
{
|
||||
if (lpItem->pszText)
|
||||
{
|
||||
if (strcmp(lpLVItem->pszText, lpItem->pszText) != 0)
|
||||
{
|
||||
uChanged |= LVIF_TEXT;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uChanged |= LVIF_TEXT;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lpItem->pszText)
|
||||
{
|
||||
uChanged |= LVIF_TEXT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return uChanged;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue