Use colpos('cover') instead of assuming the cover column is the last one

This commit is contained in:
Laurent Monin
2018-01-24 14:25:48 +01:00
parent 065c9cf3a8
commit 6c8a3aaa01

View File

@@ -639,7 +639,7 @@ class AlbumSearchDialog(SearchDialog):
if not self.table:
return
cover_cell = self.table.cellWidget(row, len(self.table_headers) - 1)
cover_cell = self.table.cellWidget(row, self.colpos('cover'))
if error:
cover_cell.not_found()
@@ -677,7 +677,7 @@ class AlbumSearchDialog(SearchDialog):
Args:
row -- Album's row in results table
"""
cover_cell = self.table.cellWidget(row, len(self.table_headers) - 1)
cover_cell = self.table.cellWidget(row, self.colpos('cover'))
if error:
cover_cell.not_found()