diff --git a/qad_blockview/blockbusitem.cpp b/qad_blockview/blockbusitem.cpp index 8acbe05..72a248b 100644 --- a/qad_blockview/blockbusitem.cpp +++ b/qad_blockview/blockbusitem.cpp @@ -550,10 +550,19 @@ void BlockBusItem::paint(QPainter * p, const QStyleOptionGraphicsItem * o, QWidg QTransform tf; tf.translate(sp.x(), sp.y()); tf.rotate(-QLineF(sp, ep).angle()); - tf.translate(0., im_bus.height() / 2.); + tf.translate(0., -im_bus.height() / 2.); + /* br.setTransform(tf); p->setPen(QPen(br, im_bus.height(), Qt::SolidLine, Qt::FlatCap, Qt::BevelJoin)); p->drawLine(sp, ep); + */ + p->save(); + p->setTransform(tf, true); + p->setPen(Qt::NoPen); + p->setBrush(br); + //p->drawLine(QPointF(0., 0.), QPointF(QLineF(sp, ep).length(), 0.)); + p->drawRect(QRectF(0., 0., QLineF(sp, ep).length(), im_bus.height())); + p->restore(); } } if (!im_end.isNull()) {