A fix to prevent mungeing of the config file after reading in
entries (say, just one entry in one group), then adding entries to a different group. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -672,6 +672,16 @@ void wxFileConfig::Parse(wxTextBuffer& buffer, bool bLocal)
|
||||
// new entry
|
||||
pEntry = m_pCurrentGroup->AddEntry(strKey, n);
|
||||
|
||||
// <JACS>
|
||||
// Take the opportunity to set some pointers now
|
||||
// that we know there are items in this group.
|
||||
// Otherwise, items added to a newly read file
|
||||
// can be put in the wrong place.
|
||||
m_pCurrentGroup->SetLastEntry(pEntry);
|
||||
if (m_pCurrentGroup->Parent())
|
||||
m_pCurrentGroup->Parent()->SetLastGroup(m_pCurrentGroup);
|
||||
// </JACS>
|
||||
|
||||
if ( bLocal )
|
||||
pEntry->SetLine(m_linesTail);
|
||||
}
|
||||
|
Reference in New Issue
Block a user