summaryrefslogtreecommitdiff
path: root/src/gui/nodeitem.cpp
diff options
context:
space:
mode:
authorGard Spreemann <gspreemann@gmail.com>2019-01-12 08:36:56 +0100
committerGard Spreemann <gspreemann@gmail.com>2019-01-12 08:36:56 +0100
commit6bf0bd3d1bce15acded6b83edabbdc329686cd7e (patch)
tree12569b7d18e006bb52dd72c649d5832e8ff6939a /src/gui/nodeitem.cpp
parent7bf0645fc8c7fd95889b7dca289fb20b4212df85 (diff)
parent579c8118f8538a7adb8c70e1909734431ecf0d10 (diff)
Merge tag 'v2.1.1' into debian/sid
Diffstat (limited to 'src/gui/nodeitem.cpp')
-rw-r--r--src/gui/nodeitem.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/nodeitem.cpp b/src/gui/nodeitem.cpp
index 18ff43c..8907573 100644
--- a/src/gui/nodeitem.cpp
+++ b/src/gui/nodeitem.cpp
@@ -72,7 +72,7 @@ void NodeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidge
QVector<qreal> p;
p << 1.0 << 2.0;
pen.setDashPattern(p);
- pen.setWidthF(2.0f);
+ pen.setWidthF(2.0);
painter->setPen(pen);
painter->setBrush(Qt::NoBrush);
painter->drawPath(shape());
@@ -135,10 +135,10 @@ void NodeItem::updateBounds()
prepareGeometryChange();
QString label = _node->label();
if (label != "") {
- QFontMetrics fm(Tikzit::LABEL_FONT);
- QRectF labelRect = fm.boundingRect(label);
- labelRect.moveCenter(QPointF(0, 0));
- _boundingRect = labelRect.united(shape().boundingRect()).adjusted(-4, -4, 4, 4);
+ //QFontMetrics fm(Tikzit::LABEL_FONT);
+ //QRectF labelRect = fm.boundingRect(label);
+ //labelRect.moveCenter(QPointF(0, 0));
+ _boundingRect = labelRect().united(shape().boundingRect()).adjusted(-4, -4, 4, 4);
} else {
_boundingRect = shape().boundingRect().adjusted(-4, -4, 4, 4);
}