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.cpp8
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;