summaryrefslogtreecommitdiff
path: root/src/gui/nodeitem.cpp
diff options
context:
space:
mode:
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);
}