From a1bb140bb53c3ba3a2112fa05304d6597d1bf138 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 24 Dec 2014 15:13:13 +0200 Subject: [PATCH] Hide objects before they need. --HG-- branch : develop --- src/app/visualization/visualization.cpp | 2 ++ src/app/visualization/visualization.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/app/visualization/visualization.cpp b/src/app/visualization/visualization.cpp index 2b9e14025..776c913e2 100644 --- a/src/app/visualization/visualization.cpp +++ b/src/app/visualization/visualization.cpp @@ -178,6 +178,7 @@ void Visualization::DrawLine(QGraphicsLineItem *lineItem, const QLineF &line, co lineItem->setPen(QPen(color, qApp->toPixel(qApp->widthHairLine())/factor, style)); lineItem->setLine(line); + lineItem->setVisible(true); } //--------------------------------------------------------------------------------------------------------------------- @@ -188,4 +189,5 @@ void Visualization::DrawPath(QGraphicsPathItem *pathItem, const QPainterPath &pa pathItem->setPen(QPen(color, qApp->toPixel(qApp->widthMainLine())/factor, style, cap)); pathItem->setPath(path); + pathItem->setVisible(true); } diff --git a/src/app/visualization/visualization.h b/src/app/visualization/visualization.h index c2151697a..c63527d24 100644 --- a/src/app/visualization/visualization.h +++ b/src/app/visualization/visualization.h @@ -101,6 +101,7 @@ protected: item->setPen(QPen(color, qApp->toPixel(qApp->widthHairLine())/factor)); item->setZValue(1); item->setFlags(QGraphicsItem::ItemStacksBehindParent); + item->setVisible(false); return item; } private: