Clean up no longer needed code, and fix text justify setting
This commit is contained in:
@@ -321,8 +321,11 @@ class GuiDocEditor(QPlainTextEdit):
|
||||
# Reload spell check and dictionaries
|
||||
SHARED.updateSpellCheckLanguage()
|
||||
|
||||
# Set font
|
||||
self.initFont()
|
||||
# Set the font. See issues #1862 and #1875.
|
||||
self.setFont(CONFIG.textFont)
|
||||
self.docHeader.updateFont()
|
||||
self.docFooter.updateFont()
|
||||
self.docSearch.updateFont()
|
||||
|
||||
# Update highlighter settings
|
||||
self._qDocument.syntaxHighlighter.initHighlighter()
|
||||
@@ -372,17 +375,6 @@ class GuiDocEditor(QPlainTextEdit):
|
||||
|
||||
return
|
||||
|
||||
def initFont(self) -> None:
|
||||
"""Set the font of the main widget and sub-widgets. This needs
|
||||
special attention since there appears to be a bug in Qt 5.15.3.
|
||||
See issues #1862 and #1875.
|
||||
"""
|
||||
self.setFont(CONFIG.textFont)
|
||||
self.docHeader.updateFont()
|
||||
self.docFooter.updateFont()
|
||||
self.docSearch.updateFont()
|
||||
return
|
||||
|
||||
def loadText(self, tHandle: str, tLine: int | None = None) -> bool:
|
||||
"""Load text from a document into the editor. If we have an I/O
|
||||
error, we must handle this and clear the editor so that we don't
|
||||
|
||||
Reference in New Issue
Block a user