Use the item box rather than the bounds when invalidating.
Implement 'bPartial' in EnsureVisible.
This commit is contained in:
parent
78a9bf8709
commit
a1ca0122b9
|
@ -866,10 +866,9 @@ static inline LRESULT CallWindowProcT(WNDPROC proc, HWND hwnd, UINT uMsg,
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LISTVIEW_InvalidateItem(infoPtr, nItem) do { \
|
#define LISTVIEW_InvalidateItem(infoPtr, nItem) do { \
|
||||||
RECT rcItem; \
|
RECT rcBox; \
|
||||||
rcItem.left = LVIR_BOUNDS; \
|
if(LISTVIEW_GetItemBox(infoPtr, nItem, &rcBox)) \
|
||||||
if(LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) \
|
LISTVIEW_InvalidateRect(infoPtr, &rcBox); \
|
||||||
LISTVIEW_InvalidateRect(infoPtr, &rcItem); \
|
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define LISTVIEW_InvalidateList(infoPtr)\
|
#define LISTVIEW_InvalidateList(infoPtr)\
|
||||||
|
@ -4102,12 +4101,12 @@ static BOOL LISTVIEW_EnsureVisible(LISTVIEW_INFO *infoPtr, INT nItem, BOOL bPart
|
||||||
INT nVertAdjust = 0;
|
INT nVertAdjust = 0;
|
||||||
INT nHorzDiff = 0;
|
INT nHorzDiff = 0;
|
||||||
INT nVertDiff = 0;
|
INT nVertDiff = 0;
|
||||||
RECT rcItem;
|
RECT rcItem, rcTemp;
|
||||||
|
|
||||||
/* FIXME: ALWAYS bPartial == FALSE, FOR NOW! */
|
|
||||||
|
|
||||||
rcItem.left = LVIR_BOUNDS;
|
rcItem.left = LVIR_BOUNDS;
|
||||||
if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) return FALSE;
|
if (!LISTVIEW_GetItemRect(infoPtr, nItem, &rcItem)) return FALSE;
|
||||||
|
|
||||||
|
if (bPartial && IntersectRect(&rcTemp, &infoPtr->rcList, &rcItem)) return TRUE;
|
||||||
|
|
||||||
if (rcItem.left < infoPtr->rcList.left || rcItem.right > infoPtr->rcList.right)
|
if (rcItem.left < infoPtr->rcList.left || rcItem.right > infoPtr->rcList.right)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue