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:
parent
7dea6fef61
commit
c5f26bf56d
|
@ -174,6 +174,15 @@ static void OnTreeSelectionChanged(HWND hwndTV, HWND hwndLV, HTREEITEM hItem, BO
|
||||||
if (bRefreshLV) {
|
if (bRefreshLV) {
|
||||||
LPWSTR keyPath;
|
LPWSTR keyPath;
|
||||||
HKEY hRootKey = NULL;
|
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);
|
keyPath = GetItemPath(hwndTV, hItem, &hRootKey);
|
||||||
RefreshListView(hwndLV, hRootKey, keyPath, NULL);
|
RefreshListView(hwndLV, hRootKey, keyPath, NULL);
|
||||||
HeapFree(GetProcessHeap(), 0, keyPath);
|
HeapFree(GetProcessHeap(), 0, keyPath);
|
||||||
|
|
Loading…
Reference in New Issue