mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-19 11:58:22 +00:00
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)
|
switch ((DWORD)insertAfter)
|
||||||
{
|
{
|
||||||
case (DWORD)TVI_FIRST:
|
case (DWORD)TVI_FIRST:
|
||||||
TREEVIEW_InsertBefore(newItem, parentItem->firstChild, parentItem);
|
|
||||||
if (infoPtr->firstVisible == parentItem->firstChild)
|
if (infoPtr->firstVisible == parentItem->firstChild)
|
||||||
TREEVIEW_SetFirstVisible(infoPtr, newItem, TRUE);
|
TREEVIEW_SetFirstVisible(infoPtr, newItem, TRUE);
|
||||||
|
TREEVIEW_InsertBefore(newItem, parentItem->firstChild, parentItem);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (DWORD)TVI_LAST:
|
case (DWORD)TVI_LAST:
|
||||||
|
|
Loading…
Reference in a new issue