diff --git a/docs/changes.txt b/docs/changes.txt index 6ec696493f..2958c1de90 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -23,6 +23,7 @@ All: - bug in wxDateTime with timezones on systems with tm_gmtoff in struct tm fixed - added wx/math.h (John Labenski) - added Catalan translations (Pau Bosch i Crespo) +- fixed bug with deleting entries at root level in wxFileConfig wxBase: diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index 44a683f407..dfb2a735f8 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -565,8 +565,17 @@ void wxFileConfig::Parse(wxTextBuffer& buffer, bool bLocal) // add the line to linked list if ( bLocal ) + { LineListAppend(strLine); + // let the root group have it start line as well + if ( !n ) + { + m_pCurrentGroup->SetLine(m_linesTail); + } + } + + // skip leading spaces for ( pStart = strLine; wxIsspace(*pStart); pStart++ ) ;