diff options
author | Gard Spreemann <gspr@nonempty.org> | 2020-04-14 09:07:12 +0200 |
---|---|---|
committer | Gard Spreemann <gspr@nonempty.org> | 2020-04-14 09:07:12 +0200 |
commit | 45669f894014e853d5add401c8d52e6ed8ffda73 (patch) | |
tree | 0b1f0927b39be726221422f258a2927909b6cf4c /src/gui/nodeitem.cpp | |
parent | 7c4e0d98192d20e67f91edeaf0236d3b9cdc4b73 (diff) | |
parent | ccf98283025f9d5cc2083c87352993dce4545e71 (diff) |
Merge tag 'v2.1.5' into debian/sid
Diffstat (limited to 'src/gui/nodeitem.cpp')
-rw-r--r-- | src/gui/nodeitem.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/nodeitem.cpp b/src/gui/nodeitem.cpp index 82692f2..7ae4c4a 100644 --- a/src/gui/nodeitem.cpp +++ b/src/gui/nodeitem.cpp @@ -91,7 +91,13 @@ void NodeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidge painter->drawPath(shape()); } - if (_node->label() != "") { + bool drawLabel = _node->label() != ""; + if (scene()) { + TikzScene *sc = static_cast<TikzScene*>(scene()); + drawLabel= drawLabel && sc->drawNodeLabels(); + } + + if (drawLabel) { QRectF rect = labelRect(); QPen pen(QColor(200,0,0,120)); QVector<qreal> d; |