- Fixed the bug where Bible "Advanced" clear button gives focus to "Quick" search field, thus making typing in it possible.

This commit is contained in:
Olli Suutari 2016-08-11 00:22:07 +03:00
parent f57bf00b3a
commit eed1407057

View File

@ -254,7 +254,7 @@ class BibleMediaItem(MediaManagerItem):
self.quickStyleComboBox.activated.connect(self.on_quick_style_combo_box_changed) self.quickStyleComboBox.activated.connect(self.on_quick_style_combo_box_changed)
self.advancedStyleComboBox.activated.connect(self.on_advanced_style_combo_box_changed) self.advancedStyleComboBox.activated.connect(self.on_advanced_style_combo_box_changed)
# Buttons # Buttons
self.advancedClearButton.clicked.connect(self.on_clear_button) self.advancedClearButton.clicked.connect(self.on_clear_button_advanced)
self.quickClearButton.clicked.connect(self.on_clear_button) self.quickClearButton.clicked.connect(self.on_clear_button)
self.advancedSearchButton.clicked.connect(self.on_advanced_search_button) self.advancedSearchButton.clicked.connect(self.on_advanced_search_button)
self.quickSearchButton.clicked.connect(self.on_quick_search_button) self.quickSearchButton.clicked.connect(self.on_quick_search_button)
@ -555,6 +555,11 @@ class BibleMediaItem(MediaManagerItem):
self.quick_search_edit.clear() self.quick_search_edit.clear()
self.quick_search_edit.setFocus() self.quick_search_edit.setFocus()
def on_clear_button_advanced(self):
# The same as the on_clear_button, but does not give focus to Quick search field.
self.list_view.clear()
self.check_search_result()
def on_lock_button_toggled(self, checked): def on_lock_button_toggled(self, checked):
self.quick_search_edit.setFocus() self.quick_search_edit.setFocus()
if checked: if checked: