X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..8bcf4c86f423035eca565571b4cbafd2e60e4c3d:/src/msw/regconf.cpp 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(); + } } // ----------------------------------------------------------------------------