mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-26 08:03:48 +02:00
Make the average stay a floating point number
This commit is contained in:
parent
79202dc833
commit
368eced255
2 changed files with 2 additions and 2 deletions
|
|
@ -301,7 +301,7 @@ def tag_data(self, role):
|
|||
if self.tag.avg is None:
|
||||
return QVariant('[%d] %s'%(self.tag.count, self.tag.name))
|
||||
else:
|
||||
return QVariant('[%d][%d] %s'%(self.tag.count, self.tag.avg, self.tag.name))
|
||||
return QVariant('[%d][%3.1f] %s'%(self.tag.count, self.tag.avg, self.tag.name))
|
||||
if role == Qt.EditRole:
|
||||
return QVariant(self.tag.name)
|
||||
if role == Qt.DecorationRole:
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ def __init__(self, name, id=None, count=0, state=0, avg=0, tooltip=None, icon=No
|
|||
self.id = id
|
||||
self.count = count
|
||||
self.state = state
|
||||
self.avg = avg/2 if avg is not None else 0
|
||||
self.avg = avg/2.0 if avg is not None else 0
|
||||
self.tooltip = tooltip
|
||||
self.icon = icon
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue