Fixed dictionary unloading bug, on language changing

This commit is contained in:
Ianos Gnatiuc 2005-11-30 06:55:55 +00:00
parent b1ea7b88dd
commit ec0141aa1d
2 changed files with 5 additions and 4 deletions

View File

@ -400,14 +400,15 @@ void CSpellChecker::Close()
// ------------------------------------------------------------------ // ------------------------------------------------------------------
bool CSpellChecker::Load(word lic, const char *userdic) bool CSpellChecker::Load(LIDC lidc, const char *userdic)
{ {
if (!IsInited()) return false; if (!IsInited()) return false;
if (IsLoaded() && (mLang->GetLangCode() == lidc)) return true;
std::vector<CSpellLang>::iterator it; CSpellLangV::iterator it;
for (it = mLangs.begin(); it != mLangs.end(); it++) for (it = mLangs.begin(); it != mLangs.end(); it++)
{ {
if ((it->GetLangCode() == lic) && it->Load(userdic)) if ((it->GetLangCode() == lidc) && it->Load(userdic))
{ {
UnLoad(); UnLoad();
mLang = it; mLang = it;

View File

@ -199,7 +199,7 @@ public:
bool Init(); bool Init();
void Close(); void Close();
bool Load(word lic, const char *userdic = NULL); bool Load(LIDC lidc, const char *userdic = NULL);
void UnLoad(); void UnLoad();
bool Check(const char *text); bool Check(const char *text);