TREEVIEW_DoSelectItem should not do any of the TVGN_FIRSTVISIBLE work
if the newSelect parameter is NULL.
This commit is contained in:
parent
824353d01b
commit
20c93c2c0d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue