forked from openlp/openlp
improved completor performance
This commit is contained in:
parent
b88436c641
commit
245465ab11
@ -451,10 +451,12 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
books = []
|
books = []
|
||||||
# We have to do a 'Verse Search'.
|
# We have to do a 'Verse Search'.
|
||||||
if self.QuickSearchComboBox.currentIndex() == 0:
|
if self.QuickSearchComboBox.currentIndex() == 0:
|
||||||
|
bibles = self.parent.manager.get_bibles()
|
||||||
bible = unicode(self.QuickVersionComboBox.currentText())
|
bible = unicode(self.QuickVersionComboBox.currentText())
|
||||||
if bible:
|
if bible:
|
||||||
book_data = self.parent.manager.get_books(bible)
|
book_data = bibles[bible].get_books()
|
||||||
books = [book[u'name'] for book in book_data]
|
books = [book.name for book in book_data]
|
||||||
|
books.sort()
|
||||||
completer = QtGui.QCompleter(books)
|
completer = QtGui.QCompleter(books)
|
||||||
completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
|
completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
|
||||||
self.QuickSearchEdit.setCompleter(completer)
|
self.QuickSearchEdit.setCompleter(completer)
|
||||||
|
Loading…
Reference in New Issue
Block a user