On InsertItem with TVI_FIRST, the check for resetting firstVisible
must be done *before* the parent's firstChild changes.
This commit is contained in:
parent
85f4a49c2d
commit
3bd7f58706
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue