mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
a6e95511a6
commit
d2c5770ae1
2 changed files with 1 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -25,8 +25,6 @@ private:
|
|||
QGraphicsPathItem *textBackgroundItem;
|
||||
QGraphicsPathItem *textItem;
|
||||
QString internalText;
|
||||
color_indice_t colorIndex;
|
||||
QBrush brush;
|
||||
double scale;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue