Fixed a traceback which is occurs when you "lock" the search and do not select a dual bible (quick tab).

bzr-revno: 1542
This commit is contained in:
Andreas Preikschat 2011-05-14 12:50:47 +02:00
commit d22cacd982

View File

@ -587,6 +587,12 @@ class BibleMediaItem(MediaManagerItem):
Check if the first item is a second bible item or not.
"""
bitem = self.listView.item(0)
if not bitem.flags() & QtCore.Qt.ItemIsSelectable:
# The item is the "No Search Results" item.
self.listView.clear()
self.displayResults(bible, second_bible)
return
else:
item_second_bible = self._decodeQtObject(bitem, 'second_bible')
if item_second_bible and second_bible or not item_second_bible and \
not second_bible: