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)
|
super().__init__(parent=prefsGui)
|
||||||
|
|
||||||
self.mainConf = novelwriter.CONFIG
|
self.mainConf = novelwriter.CONFIG
|
||||||
|
self.prefsGui = prefsGui
|
||||||
self.mainGui = prefsGui.mainGui
|
self.mainGui = prefsGui.mainGui
|
||||||
self.mainTheme = prefsGui.mainGui.mainTheme
|
self.mainTheme = prefsGui.mainGui.mainTheme
|
||||||
|
|
||||||
@@ -893,16 +894,21 @@ class GuiPreferencesSyntax(QWidget):
|
|||||||
def saveValues(self):
|
def saveValues(self):
|
||||||
"""Save the values set for this tab.
|
"""Save the values set for this tab.
|
||||||
"""
|
"""
|
||||||
# Quotes & Dialogue
|
highlightQuotes = self.highlightQuotes.isChecked()
|
||||||
self.mainConf.highlightQuotes = self.highlightQuotes.isChecked()
|
allowOpenSQuote = self.allowOpenSQuote.isChecked()
|
||||||
self.mainConf.allowOpenSQuote = self.allowOpenSQuote.isChecked()
|
allowOpenDQuote = self.allowOpenDQuote.isChecked()
|
||||||
self.mainConf.allowOpenDQuote = self.allowOpenDQuote.isChecked()
|
highlightEmph = self.highlightEmph.isChecked()
|
||||||
|
showMultiSpaces = self.showMultiSpaces.isChecked()
|
||||||
|
|
||||||
# Text Emphasis
|
self.prefsGui._updateSyntax |= self.mainConf.highlightQuotes != highlightQuotes
|
||||||
self.mainConf.highlightEmph = self.highlightEmph.isChecked()
|
self.prefsGui._updateSyntax |= self.mainConf.highlightEmph != highlightEmph
|
||||||
|
self.prefsGui._updateSyntax |= self.mainConf.showMultiSpaces != showMultiSpaces
|
||||||
|
|
||||||
# Text Errors
|
self.mainConf.highlightQuotes = highlightQuotes
|
||||||
self.mainConf.showMultiSpaces = self.showMultiSpaces.isChecked()
|
self.mainConf.allowOpenSQuote = allowOpenSQuote
|
||||||
|
self.mainConf.allowOpenDQuote = allowOpenDQuote
|
||||||
|
self.mainConf.highlightEmph = highlightEmph
|
||||||
|
self.mainConf.showMultiSpaces = showMultiSpaces
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user