Author: ekohl
Date: Thu Feb 4 23:50:36 2016
New Revision: 70691
URL: http://svn.reactos.org/svn/reactos?rev=70691&view=rev
Log:
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!
Modified:
trunk/reactos/base/applications/regedit/childwnd.c
Modified: trunk/reactos/base/applications/regedit/childwnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
==============================================================================
--- trunk/reactos/base/applications/regedit/childwnd.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedit/childwnd.c [iso-8859-1] Thu Feb 4 23:50:36 2016
@@ -308,6 +308,15 @@
{
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);
@@ -347,12 +356,6 @@
EnableMenuItem(GetSubMenu(hMenuFrame,0), ID_REGISTRY_UNLOADHIVE, MF_BYCOMMAND | MF_ENABLED);
}
}
- }
- else
- {
- (void)ListView_DeleteAllItems(g_pChildWnd->hListWnd);
- SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)NULL);
- SendMessageW(g_pChildWnd->hAddressBarWnd, WM_SETTEXT, 0, (LPARAM)NULL);
}
}