From 64dd93b1af2877f96387c19a7b245bd71c8d26e0 2012-01-26 14:18:37 From: sauimone Date: 2012-01-26 14:18:37 Subject: [PATCH] git acrobatics --- diff --git a/src/barchart/bar.cpp b/src/barchart/bar.cpp index 7aa29e5..fedf723 100644 --- a/src/barchart/bar.cpp +++ b/src/barchart/bar.cpp @@ -42,7 +42,6 @@ void Bar::setPos(qreal x, qreal y) void Bar::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { if (0 == mHeight) { - // Nothing to draw return; } // Set color for bar. TODO: gradients, textures etc @@ -52,7 +51,7 @@ void Bar::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidg painter->setPen(pen); // Draw bar - painter->drawLine(mXpos, mYpos , + painter->drawLine(mXpos, mYpos, mXpos, mYpos - mHeight); } diff --git a/src/barchart/bargroup.cpp b/src/barchart/bargroup.cpp index 3821a7c..bb51a7b 100644 --- a/src/barchart/bargroup.cpp +++ b/src/barchart/bargroup.cpp @@ -126,9 +126,6 @@ void BarGroup::layoutChanged() // TODO: width settable per bar? bar->resize(mBarDefaultWidth, barHeight); bar->setColor(mColors.at(series)); - - // TODO: bar width shouldn't affect height. Currently it does because pen width also affects height. (QPainter thingy...) -// bar->setPos(item*posStep+startPos + series * mBarDefaultWidth, mHeight - barHeight); bar->setPos(item*posStep+startPos + series * mBarDefaultWidth, mHeight); itemIndex++; }