mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Clear input box when dialog hidden and focus input box when re-shown
This commit is contained in:
parent
cbe213a2aa
commit
27153f6580
@ -93,6 +93,7 @@ class FTSDialog(Dialog):
|
|||||||
def show(self):
|
def show(self):
|
||||||
super().show()
|
super().show()
|
||||||
self.scan_status.startup()
|
self.scan_status.startup()
|
||||||
|
self.results_panel.on_show()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -793,6 +793,7 @@ class ResultsPanel(QWidget):
|
|||||||
b = self.splitter.saveState()
|
b = self.splitter.saveState()
|
||||||
gprefs['fts_search_splitter_state'] = bytearray(b)
|
gprefs['fts_search_splitter_state'] = bytearray(b)
|
||||||
self.clear_results()
|
self.clear_results()
|
||||||
|
self.sip.search_box.setText('')
|
||||||
|
|
||||||
def on_show(self):
|
def on_show(self):
|
||||||
self.sip.search_box.setFocus(Qt.FocusReason.OtherFocusReason)
|
self.sip.search_box.setFocus(Qt.FocusReason.OtherFocusReason)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user