From d2c5770ae14a79ee124959f20b01161da52c62c2 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 16 Jan 2015 17:17:55 -0200 Subject: Fix the colors - brush wasn't being set anymore. Also a bit of code cleanup. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/divetextitem.cpp | 5 +---- qt-ui/profile/divetextitem.h | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'qt-ui') 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; }; -- cgit v1.2.3-70-g09d2