added SetRecordDefaults() and IsRecordingDefaults() methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -532,6 +532,8 @@ bool wxFileConfig::Read(wxString *pstr,
|
||||
|
||||
ConfigEntry *pEntry = m_pCurrentGroup->FindEntry(path.Name());
|
||||
if (pEntry == NULL) {
|
||||
if(IsRecordingDefaults())
|
||||
Write(szKey,szDefault);
|
||||
*pstr = ExpandEnvVars(szDefault);
|
||||
return FALSE;
|
||||
}
|
||||
|
@@ -281,6 +281,9 @@ bool wxRegConfig::Read(wxString *pStr,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if(IsRecordingDefaults())
|
||||
Write(szKey,szDefault);
|
||||
|
||||
// default value
|
||||
*pStr = szDefault;
|
||||
return FALSE;
|
||||
|
Reference in New Issue
Block a user