Fixed dictionary unloading bug, on language changing
This commit is contained in:
parent
b1ea7b88dd
commit
ec0141aa1d
@ -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;
|
||||||
|
@ -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);
|
||||||
|
Reference in New Issue
Block a user