reversed change of rev 1.127: this resulted in bug 1175461 while the original bug which 1.127 fixed can't be reproduced any more (probably fixed by 1.131?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1851,20 +1851,11 @@ void wxFileConfigEntry::SetValue(const wxString& strValue, bool bUser)
|
|||||||
}
|
}
|
||||||
else // this entry didn't exist in the local file
|
else // this entry didn't exist in the local file
|
||||||
{
|
{
|
||||||
// add a new line to the file: note the hack for the root group
|
// add a new line to the file: note that line returned by
|
||||||
// which is special in that it doesn't have its own group line
|
// GetLastEntryLine() may be NULL if we're in the root group and it
|
||||||
// (something like "[/]") and so the line we get for it may be not
|
// doesn't have any entries yet, but this is ok as passing NULL
|
||||||
// its line at all if it doesn't have any entries
|
// line to LineListInsert() means to prepend new line to the list
|
||||||
//
|
|
||||||
// this is definitely not the right place to fix it but changing
|
|
||||||
// the root group to have NULL m_pLine will probably break too
|
|
||||||
// much stuff elsewhere so I don't dare to do it...
|
|
||||||
wxFileConfigLineList *line = Group()->GetLastEntryLine();
|
wxFileConfigLineList *line = Group()->GetLastEntryLine();
|
||||||
if ( !Group()->Parent() && line == Group()->GetGroupLine() )
|
|
||||||
{
|
|
||||||
// prepend the first root group entry to the head of the list
|
|
||||||
line = NULL;
|
|
||||||
}
|
|
||||||
m_pLine = Group()->Config()->LineListInsert(strLine, line);
|
m_pLine = Group()->Config()->LineListInsert(strLine, line);
|
||||||
|
|
||||||
Group()->SetLastEntry(this);
|
Group()->SetLastEntry(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user