mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
avoid using ListView_SetItemCountEx - fixes tooltips disappearing when process tree is being sorted
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@3688 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -1700,12 +1700,15 @@ static VOID PhpRestructureNodes(
|
||||
PPH_TREELIST_NODE *children;
|
||||
ULONG numberOfChildren;
|
||||
ULONG i;
|
||||
ULONG oldCount;
|
||||
|
||||
if (!PhpGetNodeChildren(Context, NULL, &children, &numberOfChildren))
|
||||
return;
|
||||
|
||||
// At this point we rebuild the entire list.
|
||||
|
||||
oldCount = Context->List->Count;
|
||||
|
||||
PhClearList(Context->List);
|
||||
Context->CanAnyExpand = FALSE;
|
||||
|
||||
@@ -1714,7 +1717,11 @@ static VOID PhpRestructureNodes(
|
||||
PhpInsertNodeChildren(Context, children[i], 0);
|
||||
}
|
||||
|
||||
ListView_SetItemCountEx(Context->ListViewHandle, Context->List->Count, LVSICF_NOSCROLL);
|
||||
// Avoid using ListView_SetItemCountEx if we can.
|
||||
if (Context->List->Count != oldCount)
|
||||
ListView_SetItemCountEx(Context->ListViewHandle, Context->List->Count, LVSICF_NOINVALIDATEALL | LVSICF_NOSCROLL);
|
||||
else
|
||||
InvalidateRect(Context->ListViewHandle, NULL, TRUE);
|
||||
}
|
||||
|
||||
static INT PhpInsertColumn(
|
||||
|
||||
Reference in New Issue
Block a user