mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1902807 [Clearing search history clears current search from bar](https://bugs.launchpad.net/calibre/+bug/1902807)
This commit is contained in:
parent
d2c52b5b8e
commit
480b2c6122
@ -156,9 +156,10 @@ class SearchBox2(QComboBox): # {{{
|
||||
self.colorize = colorize
|
||||
self.clear()
|
||||
|
||||
def clear_search_history(self):
|
||||
def clear_history(self):
|
||||
config[self.opt_name] = []
|
||||
self.clear()
|
||||
clear_search_history = clear_history
|
||||
|
||||
def hide_completer_popup(self):
|
||||
try:
|
||||
@ -173,9 +174,6 @@ class SearchBox2(QComboBox): # {{{
|
||||
def text(self):
|
||||
return self.currentText()
|
||||
|
||||
def clear_history(self, *args):
|
||||
QComboBox.clear(self)
|
||||
|
||||
def clear(self, emit_search=True):
|
||||
self.normalize_state()
|
||||
self.setEditText('')
|
||||
|
Loading…
x
Reference in New Issue
Block a user