From 2aa5c7eb3c1f621bccdd04ae7883b3c84f9108ae Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Tue, 15 Dec 2009 17:19:49 +0100 Subject: [PATCH] bugfix --- cockatrice/src/pingpixmapgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockatrice/src/pingpixmapgenerator.cpp b/cockatrice/src/pingpixmapgenerator.cpp index 81d509a5..0ae76335 100644 --- a/cockatrice/src/pingpixmapgenerator.cpp +++ b/cockatrice/src/pingpixmapgenerator.cpp @@ -7,7 +7,7 @@ QPixmap PingPixmapGenerator::generatePixmap(int size, int value, int max) pixmap.fill(Qt::transparent); QPainter painter(&pixmap); QColor color; - if (max == -1) + if ((max == -1) || (value == -1)) color = Qt::black; else color.setHsv(120 * (1.0 - ((double) value / max)), 255, 255);