Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 1.6.5 #1159

Merged
merged 4 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions novelwriter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
__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"
Expand Down
10 changes: 10 additions & 0 deletions novelwriter/assets/text/release_notes.htm
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,15 @@ <h3>Patch 1.6.4 &ndash; 29 September 2022</h3>
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.</p>

<h3>Patch 1.6.5 &ndash; 13 October 2022</h3>

<p>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.</p>

</body>
</html>
4 changes: 1 addition & 3 deletions novelwriter/dialogs/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ def _doClose(self):
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
Expand Down
5 changes: 5 additions & 0 deletions novelwriter/gui/doceditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1982,6 +1982,11 @@ def _docAutoReplace(self, theBlock):
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):
Expand Down
8 changes: 8 additions & 0 deletions novelwriter/guimain.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,16 +383,24 @@ def newProject(self, projData=None):

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
Expand Down
8 changes: 4 additions & 4 deletions sample/nwProject.nwx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="1.6.4" hexVersion="0x010604f0" fileVersion="1.3" timeStamp="2022-09-29 19:23:00">
<novelWriterXML appVersion="1.6.5" hexVersion="0x010605f0" fileVersion="1.3" timeStamp="2022-10-13 10:43:08">
<project>
<name>Sample Project</name>
<title>Sample Project</title>
<author>Jane Smith</author>
<author>Jay Doh</author>
<saveCount>1305</saveCount>
<saveCount>1306</saveCount>
<autoCount>199</autoCount>
<editTime>65071</editTime>
<editTime>65126</editTime>
</project>
<settings>
<doBackup>False</doBackup>
Expand Down Expand Up @@ -285,7 +285,7 @@
<status>1st Draft</status>
<exported>True</exported>
<layout>DOCUMENT</layout>
<charCount>315</charCount>
<charCount>314</charCount>
<wordCount>55</wordCount>
<paraCount>1</paraCount>
<cursorPos>322</cursorPos>
Expand Down