From 7f43584ed535a421887916e79b8074bb725850cc Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 24 Feb 2022 21:19:12 +0100 Subject: [PATCH] Merge bugfixes (#1009) * Fix document margin recursion error (#1007) * Fix project file icon path in Windows installer (#1006) --- novelwriter/gui/doceditor.py | 2 +- novelwriter/gui/docviewer.py | 5 +++-- setup/win_setup_embed.iss | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/novelwriter/gui/doceditor.py b/novelwriter/gui/doceditor.py index 41442385b..b1760be4f 100644 --- a/novelwriter/gui/doceditor.py +++ b/novelwriter/gui/doceditor.py @@ -1061,8 +1061,8 @@ def resizeEvent(self, theEvent): """If the text editor is resized, we must make sure the document has its margins adjusted according to user preferences. """ - QTextEdit.resizeEvent(self, theEvent) self.updateDocMargins() + QTextEdit.resizeEvent(self, theEvent) return ## diff --git a/novelwriter/gui/docviewer.py b/novelwriter/gui/docviewer.py index 72c142a05..4ec595705 100644 --- a/novelwriter/gui/docviewer.py +++ b/novelwriter/gui/docviewer.py @@ -471,10 +471,11 @@ def _openContextMenu(self, thePos): ## def resizeEvent(self, theEvent): - """Make sure the document title is the same width as the window. + """If the text editor is resized, we must make sure the document + has its margins adjusted according to user preferences. """ - QTextBrowser.resizeEvent(self, theEvent) self.updateDocMargins() + QTextBrowser.resizeEvent(self, theEvent) return def mouseReleaseEvent(self, theEvent): diff --git a/setup/win_setup_embed.iss b/setup/win_setup_embed.iss index 849115926..7505f6c17 100644 --- a/setup/win_setup_embed.iss +++ b/setup/win_setup_embed.iss @@ -51,6 +51,6 @@ Filename: "{app}\pythonw.exe"; Parameters: "{#nwAppExeName}"; Description: "{cm [Registry] Root: HKA; Subkey: "Software\Classes\.nwx\OpenWithProgids"; ValueType: string; ValueName: "novelWriterProject.nwx"; ValueData: ""; Flags: uninsdeletevalue Root: HKA; Subkey: "Software\Classes\novelWriterProject.nwx"; ValueType: string; ValueName: ""; ValueData: "novelWriter Project File"; Flags: uninsdeletekey -Root: HKA; Subkey: "Software\Classes\novelWriterProject.nwx\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\assets\icons\x-novelwriter-project.ico" +Root: HKA; Subkey: "Software\Classes\novelWriterProject.nwx\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\novelwriter\assets\icons\x-novelwriter-project.ico" Root: HKA; Subkey: "Software\Classes\novelWriterProject.nwx\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\pythonw.exe"" ""{app}\{#nwAppExeName}"" ""%1""" Root: HKA; Subkey: "Software\Classes\Applications\{#nwAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".nwx"; ValueData: ""; Flags: uninsdeletekey