Commit c5f26bf5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

regedit: Clear value list when tree root is selected.

parent 7dea6fef
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment