Fix color for internal items of piece.
This commit is contained in:
parent
03721118a6
commit
cc87f3420d
|
@ -380,6 +380,7 @@ void VPGraphicsPiece::InitPieceLabel(const QVector<QPointF> &labelShape, const V
|
||||||
auto* item = new QGraphicsSimpleTextItem(this);
|
auto* item = new QGraphicsSimpleTextItem(this);
|
||||||
item->setFont(fnt);
|
item->setFont(fnt);
|
||||||
item->setText(qsText);
|
item->setText(qsText);
|
||||||
|
item->setBrush(QBrush(color));
|
||||||
item->setTransform(labelMatrix);
|
item->setTransform(labelMatrix);
|
||||||
m_labelTextItems.append(item);
|
m_labelTextItems.append(item);
|
||||||
|
|
||||||
|
@ -488,7 +489,9 @@ void VPGraphicsPiece::PaintPiece(QPainter *painter)
|
||||||
if (painter != nullptr)
|
if (painter != nullptr)
|
||||||
{
|
{
|
||||||
painter->save();
|
painter->save();
|
||||||
painter->setPen(piecePath.PenStyle());
|
QPen pen = painter->pen();
|
||||||
|
pen.setStyle(piecePath.PenStyle());
|
||||||
|
painter->setPen(pen);
|
||||||
painter->drawPath(path);
|
painter->drawPath(path);
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user