This commit is contained in:
Andreas Preikschat 2010-09-20 20:55:14 +02:00
parent 137fb7417e
commit 8b6e90ab44

View File

@ -471,7 +471,7 @@ class BibleMediaItem(MediaManagerItem):
dual_bible, text)
if self.ClearQuickSearchComboBox.currentIndex() == 0:
self.listView.clear()
if self.listView.count() != 0:
if self.listView.count() != 0 and self.search_results:
bitem = self.listView.item(0)
item_dual_bible = self._decodeQtObject(bitem, 'dual_bible')
if item_dual_bible and dual_bible or not item_dual_bible and \
@ -486,7 +486,7 @@ class BibleMediaItem(MediaManagerItem):
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.Yes:
self.listView.clear()
self.displayResults(bible, dual_bible)
else:
elif self.search_results:
self.displayResults(bible, dual_bible)
def _decodeQtObject(self, bitem, key):
@ -737,7 +737,6 @@ class BibleMediaItem(MediaManagerItem):
dual_permission = u''
# We count the number of rows which are maybe already present.
start_count = self.listView.count()
if self.search_results:
for count, verse in enumerate(self.search_results):
if dual_bible:
vdict = {
@ -752,8 +751,7 @@ class BibleMediaItem(MediaManagerItem):
'dual_bible': QtCore.QVariant(dual_bible),
'dual_version': QtCore.QVariant(dual_version.value),
'dual_copyright': QtCore.QVariant(dual_copyright.value),
'dual_permission': QtCore.QVariant(
dual_permission.value),
'dual_permission': QtCore.QVariant(dual_permission.value),
'dual_text': QtCore.QVariant(
self.dual_search_results[count].text)
}