From 1ad6d522edba31d25f8197553eaad8dd170b7595 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 29 Feb 2004 22:25:28 +0000 Subject: [PATCH] honour the 2nd parameter of DeleteEntry() instead of always deleting empty groups unconditionally (patch 896303) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/regconf.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp index af4dc5ab68..8428fb5341 100644 --- a/src/msw/regconf.cpp +++ b/src/msw/regconf.cpp @@ -688,7 +688,8 @@ bool wxRegConfig::RenameGroup(const wxString& oldName, const wxString& newName) // ---------------------------------------------------------------------------- // deleting // ---------------------------------------------------------------------------- -bool wxRegConfig::DeleteEntry(const wxString& value, bool WXUNUSED(bGroupIfEmptyAlso)) + +bool wxRegConfig::DeleteEntry(const wxString& value, bool bGroupIfEmptyAlso) { wxConfigPathChanger path(this, value); @@ -696,7 +697,7 @@ bool wxRegConfig::DeleteEntry(const wxString& value, bool WXUNUSED(bGroupIfEmpty if ( !m_keyLocal.DeleteValue(path.Name()) ) return FALSE; - if ( m_keyLocal.IsEmpty() ) { + if ( bGroupIfEmptyAlso && m_keyLocal.IsEmpty() ) { wxString strKey = GetPath().AfterLast(wxCONFIG_PATH_SEPARATOR); SetPath(_T("..")); // changes m_keyLocal return LocalKey().DeleteKey(strKey); -- 2.45.2