Fix black square bug.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-10-22 11:31:32 +03:00
parent f0035e1f65
commit 7038b60e43

View File

@ -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);