Fix highlighting not updating on prefs change (#1278)
This commit is contained in:
@@ -25,7 +25,7 @@ jobs:
|
|||||||
- name: Install Packages (apt)
|
- name: Install Packages (apt)
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install libenchant-dev qttools5-dev-tools aspell-en
|
sudo apt install libenchant-2-dev qttools5-dev-tools aspell-en
|
||||||
- name: Checkout Source
|
- name: Checkout Source
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install Dependencies (pip)
|
- name: Install Dependencies (pip)
|
||||||
|
|||||||
@@ -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