Two more fixes for QTreeWidget

This commit is contained in:
Arjan Schrijver 2013-01-25 12:30:22 +01:00
parent dbce056688
commit 32a77e8313
2 changed files with 2 additions and 2 deletions

View File

@ -366,7 +366,7 @@ class MediaManagerItem(QtGui.QWidget):
"""
names = []
full_list = []
for count in range(self.listView.count()):
for count in range(self.listView.topLevelItemCount()):
names.append(self.listView.item(count).text())
full_list.append(self.listView.item(count).data(QtCore.Qt.UserRole))
duplicates_found = False

View File

@ -634,7 +634,7 @@ class BibleMediaItem(MediaManagerItem):
self.second_search_results = self.plugin.manager.get_verses(second_bible, versetext, book_ref_id)
if not self.advancedLockButton.isChecked():
self.listView.clear()
if self.listView.count() != 0:
if self.listView.topLevelItemCount() != 0:
self.__checkSecondBible(bible, second_bible)
elif self.search_results:
self.displayResults(bible, second_bible)