Added the handling of project dictionary in the editor as well

This commit is contained in:
Veronica K. B. Olsen
2020-09-05 17:30:50 +02:00
parent 6e949b975f
commit ba4bc54c9f
2 changed files with 13 additions and 1 deletions
+12 -1
View File
@@ -448,8 +448,17 @@ class GuiDocEditor(QTextEdit):
status bar to show the one actually loaded by the spell checker
class.
"""
self.theDict.setLanguage(self.mainConf.spellLanguage, self.theProject.projDict)
if self.theProject.projLang is None:
theLang = self.mainConf.spellLanguage
else:
theLang = self.theProject.projLang
self.theDict.setLanguage(theLang, self.theProject.projDict)
self.theParent.statusBar.setLanguage(self.theDict.spellLanguage)
if not self.bigDoc:
self.spellCheckDocument()
return True
def setSpellCheck(self, theMode):
@@ -495,6 +504,8 @@ class GuiDocEditor(QTextEdit):
"Document re-highlighted in %.3f milliseconds" % (1000*(afTime-bfTime))
)
self.theParent.statusBar.showMessage("Spell check complete")
return True
##
+1
View File
@@ -803,6 +803,7 @@ class GuiMain(QMainWindow):
if self.hasProject:
dlgProj = GuiProjectSettings(self, self.theProject)
dlgProj.exec_()
self.docEditor.setDictionaries()
self._setWindowTitle(self.theProject.projName)
return True