X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..b7ceceb1861d7583c0a544c608fcf583367e6e92:/src/msw/regconf.cpp?ds=sidebyside diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp index c7b7a470e6..af4dc5ab68 100644 --- a/src/msw/regconf.cpp +++ b/src/msw/regconf.cpp @@ -386,13 +386,14 @@ void wxRegConfig::SetPath(const wxString& strPath) // change current key(s) m_keyLocal.SetName(m_keyLocalRoot, strRegPath); - m_keyGlobal.SetName(m_keyGlobalRoot, strRegPath); - // don't create it right now, wait until it is accessed - //m_keyLocal.Create(); + if ( GetStyle() & wxCONFIG_USE_GLOBAL_FILE ) + { + m_keyGlobal.SetName(m_keyGlobalRoot, strRegPath); - wxLogNull nolog; - m_keyGlobal.Open(); + wxLogNull nolog; + m_keyGlobal.Open(); + } } // ----------------------------------------------------------------------------