Module: wine Branch: master Commit: c5f26bf56ddbf314374825fae9f66b6def582a2e URL: http://source.winehq.org/git/wine.git/?a=commit;h=c5f26bf56ddbf314374825fae9...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sat Jan 28 16:37:52 2017 +0300
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
---
programs/regedit/childwnd.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/programs/regedit/childwnd.c b/programs/regedit/childwnd.c index 08eeec1..2211d68 100644 --- a/programs/regedit/childwnd.c +++ b/programs/regedit/childwnd.c @@ -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);