TREEVIEW_DoSelectItem should not do any of the TVGN_FIRSTVISIBLE work

if the newSelect parameter is NULL.
This commit is contained in:
Evan Deaubl 2005-03-14 10:51:06 +00:00 committed by Alexandre Julliard
parent 824353d01b
commit 20c93c2c0d
1 changed files with 6 additions and 3 deletions

View File

@ -4242,9 +4242,12 @@ TREEVIEW_DoSelectItem(TREEVIEW_INFO *infoPtr, INT action, HTREEITEM newSelect,
break;
case TVGN_FIRSTVISIBLE:
TREEVIEW_EnsureVisible(infoPtr, newSelect, FALSE);
TREEVIEW_SetFirstVisible(infoPtr, newSelect, TRUE);
TREEVIEW_Invalidate(infoPtr, NULL);
if (newSelect != NULL)
{
TREEVIEW_EnsureVisible(infoPtr, newSelect, FALSE);
TREEVIEW_SetFirstVisible(infoPtr, newSelect, TRUE);
TREEVIEW_Invalidate(infoPtr, NULL);
}
break;
}