regedit: Clear value list when tree root is selected.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-01-28 16:37:52 +03:00 committed by Alexandre Julliard
parent 7dea6fef61
commit c5f26bf56d
1 changed files with 9 additions and 0 deletions

View File

@ -174,6 +174,15 @@ static void OnTreeSelectionChanged(HWND hwndTV, HWND hwndLV, HTREEITEM hItem, BO
if (bRefreshLV) {
LPWSTR keyPath;
HKEY hRootKey = NULL;
HTREEITEM rootitem;
rootitem = (HTREEITEM)SendMessageW(hwndTV, TVM_GETNEXTITEM, TVGN_ROOT, 0);
if (rootitem == hItem)
{
SendMessageW(hwndLV, LVM_DELETEALLITEMS, 0, 0);
return;
}
keyPath = GetItemPath(hwndTV, hItem, &hRootKey);
RefreshListView(hwndLV, hRootKey, keyPath, NULL);
HeapFree(GetProcessHeap(), 0, keyPath);