X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7351db919a9dab89c951406bee859b5f3bb53f7a..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/common/fileconf.cpp diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index e26936b7a5..2944b09995 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -1098,12 +1098,13 @@ bool wxFileConfig::DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso) if ( !m_pCurrentGroup->DeleteEntry(path.Name()) ) return false; + SetDirty(); + if ( bGroupIfEmptyAlso && m_pCurrentGroup->IsEmpty() ) { if ( m_pCurrentGroup != m_pRootGroup ) { wxFileConfigGroup *pGroup = m_pCurrentGroup; SetPath(wxT("..")); // changes m_pCurrentGroup! - if ( m_pCurrentGroup->DeleteSubgroupByName(pGroup->Name()) ) - SetDirty(); + m_pCurrentGroup->DeleteSubgroupByName(pGroup->Name()); } //else: never delete the root group }