]> git.phdru.name Git - m_librarian.git/commitdiff
Fix(wx/search): Do not allow empty search value
authorOleg Broytman <phd@phdru.name>
Tue, 9 Jan 2024 14:04:27 +0000 (17:04 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 9 Jan 2024 14:04:27 +0000 (17:04 +0300)
There're too many authors and books to list them all.

[skip ci]

m_librarian/wx/SearchPanels.py

index ab7bee69bb03aabcc9040ddac97514e73298efa5..06f90218794c17f146636e2d46780c4d5e06486d 100644 (file)
@@ -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: