Update spell_check.py

This commit is contained in:
chrys87 2017-02-13 13:18:14 +01:00 committed by GitHub
parent 72b8edb97a
commit d0c883fc0d

View File

@ -25,6 +25,9 @@ class command():
def getDescription(self): def getDescription(self):
return 'checks the spelling of the current word' return 'checks the spelling of the current word'
def updateSpellLanguage(self): def updateSpellLanguage(self):
if not initialized:
self.env['runtime']['outputManager'].presentText('pychant is not installed', interrupt=True)
return
self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')) self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage'))
self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')