Commit 79a11a1f authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Insert the item before calling a SetFirstVisible which can generate a

WM_PAINT message.
parent 0f586c44
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment