From bb8b0555aeb1cb9a92164f8d3e868b3ba88376e7 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:22:31 +0200 Subject: [PATCH 1/4] Backport fix for #1149 --- novelwriter/guimain.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/novelwriter/guimain.py b/novelwriter/guimain.py index f0aa7899..9399c9a7 100644 --- a/novelwriter/guimain.py +++ b/novelwriter/guimain.py @@ -383,16 +383,24 @@ class GuiMain(QMainWindow): logger.info("Creating new project") if self.theProject.newProject(projData): + self.hasProject = True + self.idleRefTime = time() + self.idleTime = 0.0 + self.rebuildTrees() self.saveProject() + self.docEditor.setDictionaries() self.rebuildIndex(beQuiet=True) + self.statusBar.setRefTime(self.theProject.projOpened) self.statusBar.setProjectStatus(nwState.GOOD) self.statusBar.setDocumentStatus(nwState.NONE) self.statusBar.setStatus(self.tr("New project created ...")) + self._updateWindowTitle(self.theProject.projName) + else: self.theProject.clearProject() return False From 038c66258b05f831478e995f0cbc13ca2f6cf653 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:24:00 +0200 Subject: [PATCH 2/4] Backport fix for #1150 --- novelwriter/gui/doceditor.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/novelwriter/gui/doceditor.py b/novelwriter/gui/doceditor.py index f2412242..83d971d5 100644 --- a/novelwriter/gui/doceditor.py +++ b/novelwriter/gui/doceditor.py @@ -1982,6 +1982,11 @@ class GuiDocEditor(QTextEdit): nDelete = 3 tInsert = nwUnicode.U_HELLIP + elif theOne == nwUnicode.U_LSEP: + # This resolves issue #1150 + nDelete = 1 + tInsert = nwUnicode.U_PSEP + tCheck = tInsert if tCheck in self.mainConf.fmtPadBefore: if self._allowSpaceBeforeColon(theText, tCheck): From 1001140eec69905420a7b9f80d2891d73b45ec97 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:25:38 +0200 Subject: [PATCH 3/4] Fix preferences dialog window size issue #989 --- novelwriter/dialogs/preferences.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/novelwriter/dialogs/preferences.py b/novelwriter/dialogs/preferences.py index 81bef52a..3b7f688c 100644 --- a/novelwriter/dialogs/preferences.py +++ b/novelwriter/dialogs/preferences.py @@ -128,9 +128,7 @@ class GuiPreferences(PagedDialog): def _saveWindowSize(self): """Save the dialog window size. """ - winWidth = self.mainConf.rpxInt(self.width()) - winHeight = self.mainConf.rpxInt(self.height()) - self.mainConf.setPreferencesSize(winWidth, winHeight) + self.mainConf.setPreferencesSize(self.width(), self.height()) return # END Class GuiPreferences From dbf672224f1ac5d91d720957897fd3c1e4c6e8c8 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 13 Oct 2022 10:44:08 +0200 Subject: [PATCH 4/4] Bump version to 1.6.5 and update changelog --- CHANGELOG.md | 33 +++++++++++++++++++++++ novelwriter/__init__.py | 6 ++--- novelwriter/assets/text/release_notes.htm | 10 +++++++ sample/nwProject.nwx | 8 +++--- 4 files changed, 50 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c3bc08f..300f82fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,38 @@ # novelWriter Changelog +## Version 1.6.5 [2022-10-13] + +### Release Notes + +This is a bugfix release that fixes a a few minor issues. The idle time for new projects would be +artificially inflated as the clock was not reset when the project was first created. This only +affects the first entry in the writing statistics. A scaling issue for the Preferences dialog has +also been fixed. It only affected screens with UI scaling enabled. Lastly, typing `Shift+Enter` in +the text editor now creates a regular line break instead of a special line separator. The line +separator serves no purpose in plain text, and was producing inconsistencies in how text is +processed and displayed. + +### Detailed Changelog + +**Bugfixes** + +* Fixed a bug where the idle time was not properly zeroed when a new project was generated after + the wizard was closed. The idle time would be calculated from the time the previous project + closed, thus inflating the value. Issue #1149. PR #1159. +* Fixes an issue where the window size of the Preferences dialog would have the GUI scaling factor + applied twice when the dialog was closed, resulting in the dialog growing in size each time it is + opened. Issue #989. PR #1159. + +**Other Changes** + +* The text editor no longer creates a Unicode line separator (U+2028) when the user presses + `Shift+Enter`. The line separator serves no purpose in a plain text editor, and the code in + general treats them as regular line break. This caused the line separator to display differently + before and after saving. The line separator character is now automatically replaced by a + paragraph separator. Issue #1150. PR #1159. + +---- + ## Version 1.6.4 [2022-09-29] ### Release Notes diff --git a/novelwriter/__init__.py b/novelwriter/__init__.py index 2ee812f4..2b40a55f 100644 --- a/novelwriter/__init__.py +++ b/novelwriter/__init__.py @@ -60,9 +60,9 @@ __license__ = "GPLv3" __author__ = "Veronica Berglyd Olsen" __maintainer__ = "Veronica Berglyd Olsen" __email__ = "code@vkbo.net" -__version__ = "1.6.4" -__hexversion__ = "0x010604f0" -__date__ = "2022-09-29" +__version__ = "1.6.5" +__hexversion__ = "0x010605f0" +__date__ = "2022-10-13" __status__ = "Stable" __domain__ = "novelwriter.io" __url__ = "https://novelwriter.io" diff --git a/novelwriter/assets/text/release_notes.htm b/novelwriter/assets/text/release_notes.htm index 1cc14d48..34c423a8 100644 --- a/novelwriter/assets/text/release_notes.htm +++ b/novelwriter/assets/text/release_notes.htm @@ -70,5 +70,15 @@ disappears. It was not necessarily obvious how the viewer panel could be restore basically no longer worked in the 1.6.3 release. This release also fixes a minor issue where the text cursor sometimes disappears when reaching the right-hand edge of the text editor window.
+This is a bugfix release that fixes a a few minor issues. The idle time for new projects would +be artificially inflated as the clock was not reset when the project was first created. This only +affects the first entry in the writing statistics. A scaling issue for the Preferences dialog has +also been fixed. It only affected screens with UI scaling enabled. Lastly, typing Shift+Enter in +the text editor now creates a regular line break instead of a special line separator. The line +separator serves no purpose in plain text, and was producing inconsistencies in how text is +processed and displayed.
+