Used a better check for the root item of the treeview. The listview, status bar and address bar should only get wiped when the user selects the root item of the treeview.

CORE-10803 #comment Retest please!

svn path=/trunk/; revision=70691
This commit is contained in:
Eric Kohl
2016-02-04 23:50:36 +00:00
parent 10bff42ab6
commit ee1d2a2874
+9 -6
View File
@@ -309,6 +309,15 @@ UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath)
LPCWSTR keyPath, rootName;
LPWSTR fullPath;
/* Wipe the listview, the status bar and the address bar if the root key was selected */
if (TreeView_GetParent(g_pChildWnd->hTreeWnd, hItem) == NULL)
{
(void)ListView_DeleteAllItems(g_pChildWnd->hListWnd);
SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)NULL);
SendMessageW(g_pChildWnd->hAddressBarWnd, WM_SETTEXT, 0, (LPARAM)NULL);
return;
}
if (pszPath == NULL)
keyPath = GetItemPath(g_pChildWnd->hTreeWnd, hItem, &hRootKey);
else
@@ -348,12 +357,6 @@ UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath)
}
}
}
else
{
(void)ListView_DeleteAllItems(g_pChildWnd->hListWnd);
SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)NULL);
SendMessageW(g_pChildWnd->hAddressBarWnd, WM_SETTEXT, 0, (LPARAM)NULL);
}
}
/*******************************************************************************