From 2b0216a398091cf6933b7cee179513be90fa37f2 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 1 Dec 2022 23:12:46 +0100 Subject: [PATCH 1/2] Changing colouring preferences on the highlighting tab needs to re-init the syntax highlighter (#1274) --- novelwriter/dialogs/preferences.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/novelwriter/dialogs/preferences.py b/novelwriter/dialogs/preferences.py index 7804c0a6..e7936991 100644 --- a/novelwriter/dialogs/preferences.py +++ b/novelwriter/dialogs/preferences.py @@ -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 From 594ccd45c762ccbe622af5883a74544048168f8e Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 1 Dec 2022 23:21:00 +0100 Subject: [PATCH 2/2] Fix linux workflow --- .github/workflows/test_linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_linux.yml b/.github/workflows/test_linux.yml index 9535e435..46aff466 100644 --- a/.github/workflows/test_linux.yml +++ b/.github/workflows/test_linux.yml @@ -25,7 +25,7 @@ jobs: - name: Install Packages (apt) run: | 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 uses: actions/checkout@v3 - name: Install Dependencies (pip)