DeleteEntry should SetDirty when any entry is removed, not just the

last one in the group.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-06-04 17:45:20 +00:00
parent 14fe087a0c
commit a625d9490d

View File

@@ -1098,12 +1098,13 @@ bool wxFileConfig::DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso)
if ( !m_pCurrentGroup->DeleteEntry(path.Name()) ) if ( !m_pCurrentGroup->DeleteEntry(path.Name()) )
return false; return false;
SetDirty();
if ( bGroupIfEmptyAlso && m_pCurrentGroup->IsEmpty() ) { if ( bGroupIfEmptyAlso && m_pCurrentGroup->IsEmpty() ) {
if ( m_pCurrentGroup != m_pRootGroup ) { if ( m_pCurrentGroup != m_pRootGroup ) {
wxFileConfigGroup *pGroup = m_pCurrentGroup; wxFileConfigGroup *pGroup = m_pCurrentGroup;
SetPath(wxT("..")); // changes m_pCurrentGroup! SetPath(wxT("..")); // changes m_pCurrentGroup!
if ( m_pCurrentGroup->DeleteSubgroupByName(pGroup->Name()) ) m_pCurrentGroup->DeleteSubgroupByName(pGroup->Name());
SetDirty();
} }
//else: never delete the root group //else: never delete the root group
} }