diff --git a/goldlib/gall/gespell.cpp b/goldlib/gall/gespell.cpp index c1fa140..0704511 100644 --- a/goldlib/gall/gespell.cpp +++ b/goldlib/gall/gespell.cpp @@ -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 (IsLoaded() && (mLang->GetLangCode() == lidc)) return true; - std::vector::iterator it; + CSpellLangV::iterator it; for (it = mLangs.begin(); it != mLangs.end(); it++) { - if ((it->GetLangCode() == lic) && it->Load(userdic)) + if ((it->GetLangCode() == lidc) && it->Load(userdic)) { UnLoad(); mLang = it; diff --git a/goldlib/gall/gespell.h b/goldlib/gall/gespell.h index c6270a0..b10fe94 100644 --- a/goldlib/gall/gespell.h +++ b/goldlib/gall/gespell.h @@ -199,7 +199,7 @@ public: bool Init(); void Close(); - bool Load(word lic, const char *userdic = NULL); + bool Load(LIDC lidc, const char *userdic = NULL); void UnLoad(); bool Check(const char *text);