fix to the last fix (see comments in patch 1093811)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-01-03 13:51:06 +00:00
parent 6b5c476168
commit eb48778d4d

View File

@@ -1402,7 +1402,9 @@ wxLanguageInfoArray *wxLocale::ms_languagesDB = NULL;
void wxLocale::DoCommonInit() void wxLocale::DoCommonInit()
{ {
m_pszOldLocale = NULL; m_pszOldLocale = NULL;
m_pOldLocale = NULL;
m_pOldLocale = wxSetLocale(this);
m_pMsgCat = NULL; m_pMsgCat = NULL;
m_language = wxLANGUAGE_UNKNOWN; m_language = wxLANGUAGE_UNKNOWN;
m_initialized = false; m_initialized = false;
@@ -1471,9 +1473,6 @@ bool wxLocale::Init(const wxChar *szName,
} }
} }
// save the old locale to be able to restore it later
m_pOldLocale = wxSetLocale(this);
// load the default catalog with wxWidgets standard messages // load the default catalog with wxWidgets standard messages
m_pMsgCat = NULL; m_pMsgCat = NULL;
bool bOk = true; bool bOk = true;
@@ -2449,9 +2448,8 @@ wxLocale::~wxLocale()
delete pTmpCat; delete pTmpCat;
} }
// restore old locale if we had changed it // restore old locale pointer
if ( m_pOldLocale ) wxSetLocale(m_pOldLocale);
wxSetLocale(m_pOldLocale);
// FIXME // FIXME
#ifndef __WXWINCE__ #ifndef __WXWINCE__