Select text in search field when it gains focus

Fixes: https://launchpad.net/bugs/1530340
This commit is contained in:
Samuel Mehrbrodt 2016-01-05 16:32:49 +01:00
parent 607371a6d7
commit c47d1bdca4
3 changed files with 3 additions and 0 deletions

View File

@ -254,6 +254,7 @@ class BibleMediaItem(MediaManagerItem):
def on_focus(self): def on_focus(self):
if self.quickTab.isVisible(): if self.quickTab.isVisible():
self.quick_search_edit.setFocus() self.quick_search_edit.setFocus()
self.quick_search_edit.selectAll()
else: else:
self.advanced_book_combo_box.setFocus() self.advanced_book_combo_box.setFocus()

View File

@ -208,6 +208,7 @@ class CustomMediaItem(MediaManagerItem):
Set the focus Set the focus
""" """
self.search_text_edit.setFocus() self.search_text_edit.setFocus()
self.search_text_edit.selectAll()
def generate_slide_data(self, service_item, item=None, xml_version=False, def generate_slide_data(self, service_item, item=None, xml_version=False,
remote=False, context=ServiceItemContext.Service): remote=False, context=ServiceItemContext.Service):

View File

@ -112,6 +112,7 @@ class SongMediaItem(MediaManagerItem):
def on_focus(self): def on_focus(self):
self.search_text_edit.setFocus() self.search_text_edit.setFocus()
self.search_text_edit.selectAll()
def config_update(self): def config_update(self):
""" """