Insert the item before calling a SetFirstVisible which can generate a

WM_PAINT message.
This commit is contained in:
Aric Stewart 2001-02-20 23:43:21 +00:00 committed by Alexandre Julliard
parent 0f586c4444
commit 79a11a1f21
1 changed files with 1 additions and 1 deletions

View File

@ -1061,9 +1061,9 @@ TREEVIEW_InsertItemA(TREEVIEW_INFO *infoPtr, LPARAM lParam)
switch ((DWORD)insertAfter)
{
case (DWORD)TVI_FIRST:
TREEVIEW_InsertBefore(newItem, parentItem->firstChild, parentItem);
if (infoPtr->firstVisible == parentItem->firstChild)
TREEVIEW_SetFirstVisible(infoPtr, newItem, TRUE);
TREEVIEW_InsertBefore(newItem, parentItem->firstChild, parentItem);
break;
case (DWORD)TVI_LAST: