From 78debe63e42a7444f6a8ecd8880aa9e1bb6013aa Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Mon, 10 Mar 2025 19:31:25 +0200 Subject: [PATCH] Closing last expanded tree node didn't update registry/ini --- od-win32/win32gui.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 021a64fe..8e866c31 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -5822,15 +5822,19 @@ static void ConfigToRegistry(struct ConfigStruct *config, int type) } idx++; } - if (fkey) { - while (exp < 1000) { - TCHAR tmp[100]; - _stprintf(tmp, _T("Expanded%03d"), exp++); - if (!regexists(fkey, tmp)) { - break; - } - regdelete(fkey, tmp); + while (exp < 1000) { + TCHAR tmp[100]; + _stprintf(tmp, _T("Expanded%03d"), exp++); + if (!fkey) { + fkey = regcreatetree(NULL, _T("ConfigurationListView")); + } + if (!fkey) { + break; + } + if (!regexists(fkey, tmp)) { + break; } + regdelete(fkey, tmp); } regclosetree(fkey); } -- 2.47.3