Commit 3bd7f587 authored by Susan Farley's avatar Susan Farley Committed by Alexandre Julliard

On InsertItem with TVI_FIRST, the check for resetting firstVisible

must be done *before* the parent's firstChild changes.
parent 85f4a49c
......@@ -1052,9 +1052,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