Added spell check language setting to project class and project settings

This commit is contained in:
Veronica K. B. Olsen
2020-09-05 17:18:18 +02:00
parent f2bb0fcea6
commit 6e949b975f
3 changed files with 48 additions and 13 deletions
+3 -2
View File
@@ -48,7 +48,7 @@ from PyQt5.QtWidgets import (
QFrame
)
from nw.core import NWDoc, NWSpellSimple, countWords
from nw.core import NWDoc, NWSpellCheck, NWSpellSimple, countWords
from nw.gui.dochighlight import GuiDocHighlighter
from nw.common import transferCase
from nw.constants import (
@@ -73,6 +73,7 @@ class GuiDocEditor(QTextEdit):
self.spellCheck = False
self.nwDocument = NWDoc(self.theProject, self.theParent)
self.theHandle = None
self.theDict = None
# Document Variables
self.charCount = 0
@@ -1334,7 +1335,7 @@ class GuiDocEditor(QTextEdit):
"""Create the spell checking object based on the spellTool
setting in config.
"""
if self.mainConf.spellTool == "enchant":
if self.mainConf.spellTool == NWSpellCheck.SP_ENCHANT:
from nw.core.spellcheck import NWSpellEnchant
self.theDict = NWSpellEnchant()
else: