aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
};