- Fixes for share ratio calculation

This commit is contained in:
Christophe Dumez
2009-01-23 19:26:22 +00:00
parent 968c3e1c3e
commit da11488ba1
4 changed files with 12 additions and 7 deletions

View File

@@ -72,7 +72,10 @@ class DLListDelegate: public QItemDelegate {
case RATIO:{
QItemDelegate::drawBackground(painter, opt, index);
double ratio = index.data().toDouble();
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(ratio, 'f', 1)));
if(ratio > 100.)
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString::fromUtf8(""));
else
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(ratio, 'f', 1)));
break;
}
case PROGRESS:{