Hugh McMaster : regedit: Allow renaming of values in root keys.

Alexandre Julliard julliard at winehq.org
Thu Jun 30 16:35:35 CDT 2022


Module: wine
Branch: master
Commit: ab03ecf7bc592bb63ef4cc1662a7741b02ec1522
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ab03ecf7bc592bb63ef4cc1662a7741b02ec1522

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Thu Jun 30 21:08:54 2022 +1000

regedit: Allow renaming of values in root keys.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>

---

 programs/regedit/framewnd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c
index 83e4ec89ee0..c9eb2c4c469 100644
--- a/programs/regedit/framewnd.c
+++ b/programs/regedit/framewnd.c
@@ -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);




More information about the wine-cvs mailing list