From 481aa96f41354b071fd4e361c90c33015d8fb8f3 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 9 Jan 2024 17:04:27 +0300 Subject: [PATCH] Fix(wx/search): Do not allow empty search value There're too many authors and books to list them all. [skip ci] --- m_librarian/wx/SearchPanels.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/m_librarian/wx/SearchPanels.py b/m_librarian/wx/SearchPanels.py index ab7bee6..06f9021 100644 --- a/m_librarian/wx/SearchPanels.py +++ b/m_librarian/wx/SearchPanels.py @@ -47,6 +47,9 @@ class SearchPanel(wx.Panel): def DoSearch(self, event): search = self.search.GetValue() + if not search: + self.search.SetFocus() + return search_substr = _search_types[self.search_substr.GetSelection()] search_case = self.search_case.GetValue() if search_case is False: -- 2.39.5