X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..3abb199dee0afdeae31bac69186751a02a37611e:/src/common/config.cpp?ds=sidebyside diff --git a/src/common/config.cpp b/src/common/config.cpp index 22037a2cdd..62013b23e4 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -33,8 +33,6 @@ #include "wx/app.h" #include "wx/file.h" -#include "wx/textfile.h" -#include "wx/utils.h" #include "wx/utils.h" #include "wx/math.h" @@ -225,8 +223,9 @@ bool wxConfigBase::DoWriteBool(const wxString& key, bool value) // ---------------------------------------------------------------------------- wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer, - const wxString& strEntry) + const wxString& strEntry) { + m_bChanged = false; m_pContainer = (wxConfigBase *)pContainer; // the path is everything which precedes the last slash @@ -243,7 +242,7 @@ wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer, { if ( m_pContainer->GetPath() != strPath ) { - // do change the path + // we do change the path so restore it later m_bChanged = true; /* JACS: work around a memory bug that causes an assert @@ -268,7 +267,6 @@ wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer, } else { // it's a name only, without path - nothing to do - m_bChanged = false; m_strName = strEntry; } }