Relax comparsion for floating point

This commit is contained in:
Chocobo1 2017-04-05 15:03:14 +08:00
parent 59556dfc6a
commit a86f189f53

View file

@ -93,7 +93,7 @@ public:
case DOWN_SPEED:
case UP_SPEED:{
qreal speed = index.data().toDouble();
if (speed == 0.0)
if (speed <= 0.0)
break;
opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter;
QItemDelegate::drawDisplay(painter, opt, opt.rect, Utils::Misc::friendlyUnit(speed, true));