From 2af6caa52707cf690cb5cc36933a2b1a10a0808e Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 2 Nov 2019 11:59:20 +0100 Subject: [PATCH] Set the proper location to rebuild a broken index --- nw/gui/winmain.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nw/gui/winmain.py b/nw/gui/winmain.py index 680ae966..ec9635db 100644 --- a/nw/gui/winmain.py +++ b/nw/gui/winmain.py @@ -307,6 +307,10 @@ class GuiMain(QMainWindow): if self.theProject.lastViewed is not None: self.viewDocument(self.theProject.lastViewed) + # Check if we need to rebuild the index + if self.theIndex.indexBroken: + self.rebuildIndex() + return True def saveProject(self):