Added the handling of project dictionary in the editor as well
This commit is contained in:
+12
-1
@@ -448,8 +448,17 @@ class GuiDocEditor(QTextEdit):
|
|||||||
status bar to show the one actually loaded by the spell checker
|
status bar to show the one actually loaded by the spell checker
|
||||||
class.
|
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)
|
self.theParent.statusBar.setLanguage(self.theDict.spellLanguage)
|
||||||
|
|
||||||
|
if not self.bigDoc:
|
||||||
|
self.spellCheckDocument()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def setSpellCheck(self, theMode):
|
def setSpellCheck(self, theMode):
|
||||||
@@ -495,6 +504,8 @@ class GuiDocEditor(QTextEdit):
|
|||||||
"Document re-highlighted in %.3f milliseconds" % (1000*(afTime-bfTime))
|
"Document re-highlighted in %.3f milliseconds" % (1000*(afTime-bfTime))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.theParent.statusBar.showMessage("Spell check complete")
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|||||||
@@ -803,6 +803,7 @@ class GuiMain(QMainWindow):
|
|||||||
if self.hasProject:
|
if self.hasProject:
|
||||||
dlgProj = GuiProjectSettings(self, self.theProject)
|
dlgProj = GuiProjectSettings(self, self.theProject)
|
||||||
dlgProj.exec_()
|
dlgProj.exec_()
|
||||||
|
self.docEditor.setDictionaries()
|
||||||
self._setWindowTitle(self.theProject.projName)
|
self._setWindowTitle(self.theProject.projName)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user