diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2019-01-11 08:50:02 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2019-01-11 08:50:02 +0100 |
commit | 6db2bfd256d2c409f0223bf2685a2829466add78 (patch) | |
tree | dc502da1f776d354b77b1c67ac620a32f3f66003 /src/gui | |
parent | 0002340da590611f635775d0555c66c7f22db09c (diff) |
keep inAngle and outAngle snapped to 15-degree increments
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/nodeitem.cpp | 10 |
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); } |