Listview Z2
Dimitrie O. Paun
dpaun at rogers.com
Fri Oct 25 09:34:19 CDT 2002
This one should make Ender happy. The Names window
in IDA now behaves properly.
ChangeLog
Handle focus item properly in SetItemCount.
--- dlls/comctl32/listview.c.Z1 Fri Oct 25 10:27:42 2002
+++ dlls/comctl32/listview.c Fri Oct 25 10:31:08 2002
@@ -6531,6 +6531,11 @@
{
RANGE range = { nItems, nOldCount };
ranges_del(infoPtr->selectionRanges, range);
+ if (infoPtr->nFocusedItem >= nItems)
+ {
+ infoPtr->nFocusedItem = -1;
+ SetRectEmpty(&infoPtr->rcFocus);
+ }
}
infoPtr->nItemCount = nItems;
@@ -6539,8 +6544,8 @@
/* the flags are valid only in ownerdata report and list modes */
if (uView == LVS_ICON || uView == LVS_SMALLICON) dwFlags = 0;
- if (!(dwFlags & LVSICF_NOSCROLL))
- LISTVIEW_EnsureVisible(infoPtr, nItems - 1, FALSE);
+ if (!(dwFlags & LVSICF_NOSCROLL) && infoPtr->nFocusedItem != -1)
+ LISTVIEW_EnsureVisible(infoPtr, infoPtr->nFocusedItem, FALSE);
if (!(dwFlags & LVSICF_NOINVALIDATEALL))
LISTVIEW_InvalidateList(infoPtr);
--
Dimi.
More information about the wine-patches
mailing list