show message when search fails

This commit is contained in:
Damien Elmes 2020-05-22 10:43:28 +10:00
parent 1844cc84cc
commit 9358c78bad

View File

@ -270,7 +270,8 @@ class CardLayout(QDialog):
cursor = editor.textCursor() cursor = editor.textCursor()
cursor.movePosition(QTextCursor.Start) cursor.movePosition(QTextCursor.Start)
editor.setTextCursor(cursor) editor.setTextCursor(cursor)
editor.find(text) if not editor.find(text):
tooltip("No matches found.")
def on_search_next(self): def on_search_next(self):
text = self.tform.search_edit.text() text = self.tform.search_edit.text()