Prevented LISTBOX_RepaintItem from repainting a non visible item.
This commit is contained in:
parent
9caedbd948
commit
428d298a64
@ -565,7 +565,9 @@ static void LISTBOX_RepaintItem( WND *wnd, LB_DESCR *descr, INT index,
|
|||||||
HFONT oldFont = 0;
|
HFONT oldFont = 0;
|
||||||
HBRUSH hbrush, oldBrush = 0;
|
HBRUSH hbrush, oldBrush = 0;
|
||||||
|
|
||||||
if (descr->style & LBS_NOREDRAW) return;
|
/* Do not repaint the item if the item is not visible */
|
||||||
|
if ((descr->style & LBS_NOREDRAW) || !IsWindowVisible(wnd->hwndSelf)) return;
|
||||||
|
|
||||||
if (LISTBOX_GetItemRect( wnd, descr, index, &rect ) != 1) return;
|
if (LISTBOX_GetItemRect( wnd, descr, index, &rect ) != 1) return;
|
||||||
if (!(hdc = GetDCEx( wnd->hwndSelf, 0, DCX_CACHE ))) return;
|
if (!(hdc = GetDCEx( wnd->hwndSelf, 0, DCX_CACHE ))) return;
|
||||||
if (descr->font) oldFont = SelectObject( hdc, descr->font );
|
if (descr->font) oldFont = SelectObject( hdc, descr->font );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user