regedit: Allow renaming of values in root keys.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
Hugh McMaster 2022-06-30 21:08:54 +10:00 committed by Alexandre Julliard
parent 0a10bfc8b1
commit ab03ecf7bc

View file

@ -946,9 +946,10 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case ID_EDIT_RENAME:
{
WCHAR* keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot);
if (keyPath == 0 || *keyPath == 0) {
if (!keyPath) {
MessageBeep(MB_ICONHAND);
} else if (GetFocus() == g_pChildWnd->hTreeWnd) {
break;
} else if (*keyPath && GetFocus() == g_pChildWnd->hTreeWnd) {
StartKeyRename(g_pChildWnd->hTreeWnd);
} else if (GetFocus() == g_pChildWnd->hListWnd) {
StartValueRename(g_pChildWnd->hListWnd);