Changing colouring preferences on the highlighting tab needs to re-init the syntax highlighter (#1274)
This commit is contained in:
@@ -826,6 +826,7 @@ class GuiPreferencesSyntax(QWidget):
|
||||
super().__init__(parent=prefsGui)
|
||||
|
||||
self.mainConf = novelwriter.CONFIG
|
||||
self.prefsGui = prefsGui
|
||||
self.mainGui = prefsGui.mainGui
|
||||
self.mainTheme = prefsGui.mainGui.mainTheme
|
||||
|
||||
@@ -893,16 +894,21 @@ class GuiPreferencesSyntax(QWidget):
|
||||
def saveValues(self):
|
||||
"""Save the values set for this tab.
|
||||
"""
|
||||
# Quotes & Dialogue
|
||||
self.mainConf.highlightQuotes = self.highlightQuotes.isChecked()
|
||||
self.mainConf.allowOpenSQuote = self.allowOpenSQuote.isChecked()
|
||||
self.mainConf.allowOpenDQuote = self.allowOpenDQuote.isChecked()
|
||||
highlightQuotes = self.highlightQuotes.isChecked()
|
||||
allowOpenSQuote = self.allowOpenSQuote.isChecked()
|
||||
allowOpenDQuote = self.allowOpenDQuote.isChecked()
|
||||
highlightEmph = self.highlightEmph.isChecked()
|
||||
showMultiSpaces = self.showMultiSpaces.isChecked()
|
||||
|
||||
# Text Emphasis
|
||||
self.mainConf.highlightEmph = self.highlightEmph.isChecked()
|
||||
self.prefsGui._updateSyntax |= self.mainConf.highlightQuotes != highlightQuotes
|
||||
self.prefsGui._updateSyntax |= self.mainConf.highlightEmph != highlightEmph
|
||||
self.prefsGui._updateSyntax |= self.mainConf.showMultiSpaces != showMultiSpaces
|
||||
|
||||
# Text Errors
|
||||
self.mainConf.showMultiSpaces = self.showMultiSpaces.isChecked()
|
||||
self.mainConf.highlightQuotes = highlightQuotes
|
||||
self.mainConf.allowOpenSQuote = allowOpenSQuote
|
||||
self.mainConf.allowOpenDQuote = allowOpenDQuote
|
||||
self.mainConf.highlightEmph = highlightEmph
|
||||
self.mainConf.showMultiSpaces = showMultiSpaces
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user