Fix black square bug.
--HG-- branch : develop
This commit is contained in:
parent
f0035e1f65
commit
7038b60e43
|
@ -47,7 +47,9 @@ VScaledLine::VScaledLine(const QLineF &line, QGraphicsItem *parent)
|
||||||
void VScaledLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void VScaledLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||||
{
|
{
|
||||||
QPen lPen = pen();
|
QPen lPen = pen();
|
||||||
lPen.setWidthF(ScaleWidth(basicWidth, SceneScale(scene())));
|
|
||||||
|
const qreal width = ScaleWidth(basicWidth, SceneScale(scene()));
|
||||||
|
qRound(width) < 1 ? lPen.setWidthF(width) : lPen.setWidth(qRound(width));
|
||||||
setPen(lPen);
|
setPen(lPen);
|
||||||
|
|
||||||
QGraphicsLineItem::paint(painter, option, widget);
|
QGraphicsLineItem::paint(painter, option, widget);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user