From 5afd402c8b4a3616ee6ab1b459daf2fb639f75b9 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Fri, 31 Dec 2021 14:58:17 +0100 Subject: [PATCH] Merge 1.5.3 fixes (#940) * Resolve #918 * Resolve #935 * Bump version and update changelog and release notes --- CHANGELOG.md | 25 +++++++++++++++++++++++ novelwriter/assets/text/release_notes.htm | 15 ++++++++++++-- novelwriter/gui/mainmenu.py | 2 +- novelwriter/gui/projtree.py | 7 +++++-- sample/nwProject.nwx | 8 ++++---- 5 files changed, 48 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a2a3e11..1426f079 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # novelWriter Changelog +## Version 1.5.3 [2021-12-31] + +### Release Notes + +This is a bugfix release that fixes two cosmetic issues. The first fix resolves and issue with the +emphasis of partition or chapter items in the project tree not changing when the item is changed to +a scene item. The second fix changes how the Create Root Folder submenu works. Instead of disabling +the menu entries that are no longer available, they are instead removed. Disabled menu entries are +not displayed correctly in all colour themes. + +### Detailed Changelog + +**Bugfixes** + +* The syntax themes lack a proper colouring for disabled menu entries. The only place menu entries + are disabled is in the Create Root Folder menu, so the simplest solution was to just replace the + enable/disable logic with switching on and off visibility like other menus in novelWriter do. + Issue #918. +* The if-condition that determined whether an item in the Project Tree were to receive a bold and + underline formatting for its label lacked the logic to disable these when the item should not + receive it any longer. I.e., when a chapter was converted to a scene, the emphasis remained. + Issue #935. + +---- + ## Version 1.5.2 [2021-12-12] ### Release Notes diff --git a/novelwriter/assets/text/release_notes.htm b/novelwriter/assets/text/release_notes.htm index 1fde313b..238dbb0a 100644 --- a/novelwriter/assets/text/release_notes.htm +++ b/novelwriter/assets/text/release_notes.htm @@ -2,6 +2,19 @@ +

Release Notes for 1.5.3

+

Released on 31 December 2021

+ +

This is a bugfix release that fixes two cosmetic issues. The first fix resolves and issue with +the emphasis of partition or chapter items in the project tree not changing when the item is +changed to a scene item. The second fix changes how the Create Root Folder submenu works. Instead +of disabling the menu entries that are no longer available, they are instead removed. Disabled menu +entries are not displayed correctly in all colour themes.

+ +

See also the Releases page.

+ +
+

Release Notes for 1.5.2

Released on 12 December 2021

@@ -10,8 +23,6 @@ output if a paragraph has alignment or indentation tags while at the same time c emphasised text. The second is an issue where the application cannot load a project with spell checking enabled if there is something wrong with the spell check package.

-

See also the Releases page.

-

Release Notes for 1.5.1

diff --git a/novelwriter/gui/mainmenu.py b/novelwriter/gui/mainmenu.py index 1255abef..7dcc6e59 100644 --- a/novelwriter/gui/mainmenu.py +++ b/novelwriter/gui/mainmenu.py @@ -84,7 +84,7 @@ class GuiMainMenu(QMenuBar): continue if itemClass == nwItemClass.TRASH: continue - self.rootItems[itemClass].setEnabled( + self.rootItems[itemClass].setVisible( self.theProject.projTree.checkRootUnique(itemClass) ) return diff --git a/novelwriter/gui/projtree.py b/novelwriter/gui/projtree.py index a020ff13..2209fdf0 100644 --- a/novelwriter/gui/projtree.py +++ b/novelwriter/gui/projtree.py @@ -628,11 +628,14 @@ class GuiProjectTree(QTreeWidget): trItem.setToolTip(self.C_STATUS, nwItem.itemStatus) if self.mainConf.emphLabels and nwItem.itemLayout == nwItemLayout.DOCUMENT: + trFont = trItem.font(self.C_NAME) if hLevel in ("H1", "H2"): - trFont = trItem.font(self.C_NAME) trFont.setBold(True) trFont.setUnderline(True) - trItem.setFont(self.C_NAME, trFont) + else: + trFont.setBold(False) + trFont.setUnderline(False) + trItem.setFont(self.C_NAME, trFont) return diff --git a/sample/nwProject.nwx b/sample/nwProject.nwx index 3a0a34ce..3038c132 100644 --- a/sample/nwProject.nwx +++ b/sample/nwProject.nwx @@ -1,13 +1,13 @@ - + Sample Project Sample Project Jane Smith Jay Doh - 1260 + 1265 198 - 62008 + 62062 False @@ -121,7 +121,7 @@ 2429 432 14 - 1760 + 2 Another Scene