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
This commit is contained in:
Vadim Zeitlin
2004-02-29 22:25:28 +00:00
parent c79ba234fa
commit 1ad6d522ed

View File

@@ -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);