Continue search in next file is now working

This commit is contained in:
Veronica K. B. Olsen
2020-06-17 19:16:32 +02:00
parent 0ddb7ad1de
commit ad21c6e3a4
4 changed files with 68 additions and 15 deletions
+10 -7
View File
@@ -1167,13 +1167,16 @@ class GuiDocEditor(QTextEdit):
searchFor = self.docSearch.getSearchText()
wasFound = self.find(searchFor, findOpt)
if not wasFound and self.docSearch.doLoop:
theCursor = self.textCursor()
theCursor.movePosition(
QTextCursor.End if isBackward else QTextCursor.Start
)
self.setTextCursor(theCursor)
self.find(searchFor, findOpt)
if not wasFound:
if self.docSearch.doLoop:
theCursor = self.textCursor()
theCursor.movePosition(
QTextCursor.End if isBackward else QTextCursor.Start
)
self.setTextCursor(theCursor)
self.find(searchFor, findOpt)
elif self.docSearch.doNextFile:
self.theParent.openNextDocument(self.theHandle)
return