summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-01-16 17:17:55 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-17 08:54:00 +1300
commitd2c5770ae14a79ee124959f20b01161da52c62c2 (patch)
treef262a1fdb82c36624a16b9f7df548711bd23a627 /qt-ui/profile
parenta6e95511a681043907c2718b19d9d9023af173a9 (diff)
downloadsubsurface-d2c5770ae14a79ee124959f20b01161da52c62c2.tar.gz
Fix the colors - brush wasn't being set anymore.
Also a bit of code cleanup. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/divetextitem.cpp5
-rw-r--r--qt-ui/profile/divetextitem.h2
2 files changed, 1 insertions, 6 deletions
diff --git a/qt-ui/profile/divetextitem.cpp b/qt-ui/profile/divetextitem.cpp
index ddaf6efb2..24f9d6b25 100644
--- a/qt-ui/profile/divetextitem.cpp
+++ b/qt-ui/profile/divetextitem.cpp
@@ -14,13 +14,11 @@ DiveTextItem::DiveTextItem(QGraphicsItem *parent) : QGraphicsItemGroup(parent),
internalAlignFlags(Qt::AlignHCenter | Qt::AlignVCenter),
textBackgroundItem(new QGraphicsPathItem(this)),
textItem(new QGraphicsPathItem(this)),
- colorIndex(SAC_DEFAULT),
scale(1.0)
{
setFlag(ItemIgnoresTransformations);
textBackgroundItem->setBrush(QBrush(getColor(TEXT_BACKGROUND)));
textBackgroundItem->setPen(Qt::NoPen);
- textItem->setBrush(brush);
textItem->setPen(Qt::NoPen);
}
@@ -32,8 +30,7 @@ void DiveTextItem::setAlignment(int alignFlags)
void DiveTextItem::setBrush(const QBrush &b)
{
- brush = b;
- updateText();
+ textItem->setBrush(b);
}
void DiveTextItem::setScale(double newscale)
diff --git a/qt-ui/profile/divetextitem.h b/qt-ui/profile/divetextitem.h
index a6c0622f8..0c0ec4b86 100644
--- a/qt-ui/profile/divetextitem.h
+++ b/qt-ui/profile/divetextitem.h
@@ -25,8 +25,6 @@ private:
QGraphicsPathItem *textBackgroundItem;
QGraphicsPathItem *textItem;
QString internalText;
- color_indice_t colorIndex;
- QBrush brush;
double scale;
};