Rebuild index when opdating project (#1235)

This commit is contained in:
Veronica Berglyd Olsen
2022-11-12 18:23:13 +01:00
parent 74d71f24ca
commit e7ce13f647
5 changed files with 45 additions and 20 deletions
+4 -1
View File
@@ -369,8 +369,11 @@ class NWProject(QObject):
self._scanProjectFolder()
self._index.loadIndex()
self.updateWordCounts()
if xmlReader.state == XMLReadState.WAS_LEGACY:
# Often, the index needs to be rebuilt when updating format
self._index.rebuildIndex()
self.updateWordCounts()
self._projOpened = time()
self._projAltered = False