From f2b0e68985e9c54f8011a6cb8b46993db1f7f403 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 29 May 2010 13:12:55 -0600 Subject: [PATCH] Fix behavior of delete saved search button --- src/calibre/gui2/search_box.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/search_box.py b/src/calibre/gui2/search_box.py index 8627802ef4..d3059992bc 100644 --- a/src/calibre/gui2/search_box.py +++ b/src/calibre/gui2/search_box.py @@ -297,9 +297,11 @@ class SavedSearchBox(QComboBox): if idx < 0: return ss = self.saved_searches.lookup(unicode(self.currentText())) + if ss is None: + return self.saved_searches.delete(unicode(self.currentText())) self.clear_to_help() - self.search_box.set_search_string(ss) + self.search_box.clear_to_help() self.emit(SIGNAL('changed()')) # SIGNALed from the main UI