Enhancement #1897432: Delete entries in the Manage Saved searches screen using the Delete key

This commit is contained in:
Charles Haley 2020-09-28 10:59:22 +01:00
parent 86e4b2cc6a
commit 4291fb7f32

View File

@ -141,6 +141,13 @@ class SavedSearchEditor(Dialog):
if ans in self.searches:
return ans
def keyPressEvent(self, ev):
if ev.key() == Qt.Key_Delete:
self.del_search()
print('delete')
return
return Dialog.keyPressEvent(self, ev)
def populate_search_list(self):
self.slist.clear()
for name in sorted(self.searches.keys(), key=sort_key):