Regedit: Fixed a bug whereby a registry path accessed by "Goto" might not get properly selected

svn path=/trunk/; revision=18307
This commit is contained in:
Nathan Woods 2005-10-07 00:35:10 +00:00
parent 37a51aa3f6
commit 4294896fbd

View file

@ -600,7 +600,7 @@ BOOL SelectNode(HWND hwndTV, LPCTSTR keyPath)
{
memset(&tvi, 0, sizeof(tvi));
tvi.hItem = hChildItem;
tvi.mask = TVIF_TEXT;
tvi.mask = TVIF_TEXT | TVIF_CHILDREN;
tvi.pszText = szBuffer;
tvi.cchTextMax = sizeof(szBuffer) / sizeof(szBuffer[0]);
@ -613,8 +613,11 @@ BOOL SelectNode(HWND hwndTV, LPCTSTR keyPath)
if (!hChildItem)
return FALSE;
if (!TreeView_Expand(hwndTV, hChildItem, TVE_EXPAND))
return FALSE;
if (tvi.cChildren > 0)
{
if (!TreeView_Expand(hwndTV, hChildItem, TVE_EXPAND))
return FALSE;
}
keyPath = s ? s + 1 : _T("");
hItem = hChildItem;