From: Oleg Broytman Date: Tue, 9 Jan 2024 14:04:27 +0000 (+0300) Subject: Fix(wx/search): Do not allow empty search value X-Git-Tag: 0.3.0~9^2~7 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=481aa96f41354b071fd4e361c90c33015d8fb8f3;p=m_librarian.git Fix(wx/search): Do not allow empty search value There're too many authors and books to list them all. [skip ci] --- 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: