In device view, make "waiting to sync" icon have precedence over "matched" icon

This commit is contained in:
Charles Haley 2013-07-11 15:44:38 +02:00
parent 1c8cdbe9ff
commit bb94f0007b

View File

@ -1545,10 +1545,10 @@ class DeviceBooksModel(BooksModel): # {{{
self.db.supports_collections()): self.db.supports_collections()):
return QVariant(_("Double click to <b>edit</b> me<br><br>")) return QVariant(_("Double click to <b>edit</b> me<br><br>"))
elif role == Qt.DecorationRole and cname == 'inlibrary': elif role == Qt.DecorationRole and cname == 'inlibrary':
if self.db[self.map[row]].in_library: if hasattr(self.db[self.map[row]], 'in_library_waiting'):
return QVariant(self.bool_yes_icon)
elif hasattr(self.db[self.map[row]], 'in_library_waiting'):
return QVariant(self.sync_icon) return QVariant(self.sync_icon)
elif self.db[self.map[row]].in_library:
return QVariant(self.bool_yes_icon)
elif self.db[self.map[row]].in_library is not None: elif self.db[self.map[row]].in_library is not None:
return QVariant(self.bool_no_icon) return QVariant(self.bool_no_icon)
elif role == Qt.TextAlignmentRole: elif role == Qt.TextAlignmentRole: