mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-25 09:44:17 +02: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
1 changed files with 2 additions and 4 deletions
|
|
@ -156,9 +156,10 @@ def initialize(self, opt_name, colorize=False, help_text=_('Search'), as_you_typ
|
|||
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 @@ def normalize_state(self):
|
|||
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…
Reference in a new issue