diff --git a/README.md b/README.md index a4474d3..5ec7f45 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Download the latest release](docs/img/download-button.png)](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.7.pyzw) +[![Download the latest release](docs/img/download-button.png)](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.8.pyzw) [![Changelog](docs/img/changelog-button.png)](docs/changelog.md) [![News](docs/img/news-button.png)](https://github.com/peter88213/novelibre/discussions/1) [![Online help](docs/img/help-button.png)](https://peter88213.github.io/nvhelp-en/) @@ -81,10 +81,10 @@ I use the program myself and fix errors immediately if I notice any. As far as I ### Default: Executable Python zip archive -Download the latest release [novelibre_v4.11.7.pyzw](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.7.pyzw) +Download the latest release [novelibre_v4.11.8.pyzw](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.8.pyzw) -- Launch *novelibre_v4.11.7.pyzw* by double-clicking (Windows/Linux desktop), -- or execute `python novelibre_v4.11.7.pyzw` (Windows), resp. `python3 novelibre_v4.11.7.pyzw` (Linux) on the command line. +- Launch *novelibre_v4.11.8.pyzw* by double-clicking (Windows/Linux desktop), +- or execute `python novelibre_v4.11.8.pyzw` (Windows), resp. `python3 novelibre_v4.11.8.pyzw` (Linux) on the command line. #### Important @@ -100,9 +100,9 @@ the zip file. ### Alternative: Zip file -The package is also available in zip format: [novelibre_v4.11.7.zip](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.7.zip) +The package is also available in zip format: [novelibre_v4.11.8.zip](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.8.zip) -- Extract the *novelibre_v4.11.7* folder from the downloaded zipfile "novelibre_v4.11.7.zip". +- Extract the *novelibre_v4.11.8* folder from the downloaded zipfile "novelibre_v4.11.8.zip". - Move into this new folder and launch *setup.pyw* by double-clicking (Windows/Linux desktop), - or execute `python setup.pyw` (Windows), resp. `python3 setup.pyw` (Linux) on the command line. diff --git a/VERSION b/VERSION index 5579ba3..4df252a 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ [LATEST] -version = 4.11.7 -download_link = https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.7.pyzw +version = 4.11.8 +download_link = https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.8.pyzw diff --git a/dist/novelibre_v4.11.7.pyzw b/dist/novelibre_v4.11.7.pyzw deleted file mode 100644 index 700aeab..0000000 Binary files a/dist/novelibre_v4.11.7.pyzw and /dev/null differ diff --git a/dist/novelibre_v4.11.7.zip b/dist/novelibre_v4.11.7.zip deleted file mode 100644 index 90a0159..0000000 Binary files a/dist/novelibre_v4.11.7.zip and /dev/null differ diff --git a/dist/novelibre_v4.11.8.pyzw b/dist/novelibre_v4.11.8.pyzw new file mode 100644 index 0000000..376ff4a Binary files /dev/null and b/dist/novelibre_v4.11.8.pyzw differ diff --git a/dist/novelibre_v4.11.8.zip b/dist/novelibre_v4.11.8.zip new file mode 100644 index 0000000..38b15e8 Binary files /dev/null and b/dist/novelibre_v4.11.8.zip differ diff --git a/docs/changelog.md b/docs/changelog.md index 25c91f2..817e706 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -8,6 +8,12 @@ See the [GitHub "Features" project](https://github.com/users/peter88213/projects/14). +### Version 4.11.8 + +- Fix a bug where an exception is raised when trying to add a parent element to the tree while the project is locked. + +Based on novxlib 4.7.2 + ### Version 4.11.7 - Fix HTML report title display. diff --git a/i18n/de.po b/i18n/de.po index b520b3c..d78c3a7 100644 --- a/i18n/de.po +++ b/i18n/de.po @@ -3,9 +3,9 @@ # msgid "" msgstr "" -"Project-Id-Version: 4.11.7\n" -"POT-Creation-Date: 2024-10-16 10:40:19\n" -"PO-Revision-Date: 2024-10-16 10:40:19\n" +"Project-Id-Version: 4.11.8\n" +"POT-Creation-Date: 2024-10-17 18:08:32\n" +"PO-Revision-Date: 2024-10-17 18:08:32\n" "Last-Translator: Peter Triesberger\n" "Language: de\n" "MIME-Version: 1.0\n" diff --git a/i18n/locale/de/LC_MESSAGES/novelibre.mo b/i18n/locale/de/LC_MESSAGES/novelibre.mo index 792473e..8ab5aae 100644 Binary files a/i18n/locale/de/LC_MESSAGES/novelibre.mo and b/i18n/locale/de/LC_MESSAGES/novelibre.mo differ diff --git a/i18n/messages.pot b/i18n/messages.pot index e7d4cdb..9c3106e 100644 --- a/i18n/messages.pot +++ b/i18n/messages.pot @@ -3,8 +3,8 @@ # msgid "" msgstr "" -"Project-Id-Version: 4.11.7\n" -"POT-Creation-Date: 2024-10-16 10:40:19\n" +"Project-Id-Version: 4.11.8\n" +"POT-Creation-Date: 2024-10-17 18:08:32\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: LANGUAGE\n" diff --git a/src/nvlib/controller/nv_controller.py b/src/nvlib/controller/nv_controller.py index 474d81a..bfdeaeb 100644 --- a/src/nvlib/controller/nv_controller.py +++ b/src/nvlib/controller/nv_controller.py @@ -303,11 +303,13 @@ def add_parent(self, event=None): if self._mdl.prjFile is None: return - if not self.check_lock(): - try: - selection = self._ui.tv.tree.selection()[0] - except: - return + if self.check_lock(): + return + + try: + selection = self._ui.tv.tree.selection()[0] + except: + return if selection.startswith(SECTION_PREFIX): self.add_chapter(targetNode=selection) @@ -1069,15 +1071,17 @@ def set_character_status(self, isMajor, elemIds=None): isMajor: bool -- If True, make the characters major. Otherwise, make them minor. elemIds: list of character IDs to process. """ - if not self.check_lock(): - if elemIds is None: - try: - elemIds = self._ui.tv.tree.selection() - except: - return + if self.check_lock(): + return - self._ui.tv.open_children(CR_ROOT) - self._mdl.set_character_status(isMajor, elemIds) + if elemIds is None: + try: + elemIds = self._ui.tv.tree.selection() + except: + return + + self._ui.tv.open_children(CR_ROOT) + self._mdl.set_character_status(isMajor, elemIds) def set_level(self, newLevel, elemIds=None): """Set chapter or stage level. @@ -1086,14 +1090,16 @@ def set_level(self, newLevel, elemIds=None): newLevel: int -- New level to be set. elemIds: list of IDs to process. """ - if not self.check_lock(): - if elemIds is None: - try: - elemIds = self._ui.tv.tree.selection() - except: - return + if self.check_lock(): + return + + if elemIds is None: + try: + elemIds = self._ui.tv.tree.selection() + except: + return - self._mdl.set_level(newLevel, elemIds) + self._mdl.set_level(newLevel, elemIds) def set_completion_status(self, newStatus, elemIds=None): """Set section completion status (Outline/Draft..). @@ -1102,15 +1108,17 @@ def set_completion_status(self, newStatus, elemIds=None): newStatus: int -- New section status to be set. elemIds: list of IDs to process. """ - if not self.check_lock(): - if elemIds is None: - try: - elemIds = self._ui.tv.tree.selection() - except: - return + if self.check_lock(): + return - self._ui.tv.open_children(elemIds[0]) - self._mdl.set_completion_status(newStatus, elemIds) + if elemIds is None: + try: + elemIds = self._ui.tv.tree.selection() + except: + return + + self._ui.tv.open_children(elemIds[0]) + self._mdl.set_completion_status(newStatus, elemIds) def set_type(self, newType, elemIds=None): """Set section or chapter type Normal). @@ -1119,15 +1127,17 @@ def set_type(self, newType, elemIds=None): newType: int -- New type to be set. elemIds: list of IDs to process. """ - if not self.check_lock(): - if elemIds is None: - try: - elemIds = self._ui.tv.tree.selection() - except: - return + if self.check_lock(): + return + + if elemIds is None: + try: + elemIds = self._ui.tv.tree.selection() + except: + return - self._ui.tv.open_children(elemIds[0]) - self._mdl.set_type(newType, elemIds) + self._ui.tv.open_children(elemIds[0]) + self._mdl.set_type(newType, elemIds) def show_report(self, suffix): """Create HTML report for the web browser. diff --git a/tools/build.py b/tools/build.py index bc7c8b8..f57a27d 100644 --- a/tools/build.py +++ b/tools/build.py @@ -12,7 +12,7 @@ sys.path.insert(0, f'{os.getcwd()}/../../novelibre/tools') from package_builder import PackageBuilder -VERSION = '4.11.7' +VERSION = '4.11.8' class ApplicationBuilder(PackageBuilder):