]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/config.cpp
small optimization in wxConfigPathChanger: don't change the path if it is already...
[wxWidgets.git] / src / common / config.cpp
index 7e4173e4e237006b1c536fb82570a5696b18a554..80b43e4b9a5c5a38cfdf2278c727aabc370193c2 100644 (file)
@@ -239,7 +239,7 @@ wxConfigPathChanger::wxConfigPathChanger(const wxConfigBase *pContainer,
     strPath = wxCONFIG_PATH_SEPARATOR;
   }
 
-  if ( !strPath.IsEmpty() ) {
+  if ( !strPath.IsEmpty() && m_pContainer->GetPath() != strPath ) {
     // do change the path
     m_bChanged = true;
     m_strName = strEntry.AfterLast(wxCONFIG_PATH_SEPARATOR);