diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-07-02 13:39:54 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-07-02 13:39:54 -0300 |
commit | a7506848b31a3bde21096cf34caacce8a7509f44 (patch) | |
tree | b1fbcda9b3ddc1e88aa5d34b86b56753f0d36fb1 /qt-ui | |
parent | effb7e2fac59cf2b44aa010b1ee17de24d7c6214 (diff) | |
download | subsurface-a7506848b31a3bde21096cf34caacce8a7509f44.tar.gz |
Removed user-entered lines on the plan, keeping only deco.
Removed the user-entered lines on the plan, keeping only deco,
This way the graph looks way prettier and we don't loose any
functionality.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 8f8a3b534..146484a49 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -87,7 +87,7 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent) scene()->addItem(depthString); diveBg = new QGraphicsPolygonItem(); - diveBg->setBrush(QBrush(Qt::green)); + diveBg->setPen(QPen(QBrush(),0)); scene()->addItem(diveBg); plusDepth = new Button(); @@ -233,12 +233,14 @@ void DivePlannerGraphics::createDecoStops() for (dp = diveplan.dp; dp != NULL; dp = dp->next) { double xpos = timeLine->posAtValue(dp->time / 60.0); double ypos = depthLine->posAtValue(dp->depth / 1000.0); - QGraphicsLineItem *item = new QGraphicsLineItem(lastx, lasty, xpos, ypos); - item->setPen(QPen(QBrush(dp->entered ? Qt::black : Qt::red),0)); + if(!dp->entered){ + QGraphicsLineItem *item = new QGraphicsLineItem(lastx, lasty, xpos, ypos); + item->setPen(QPen(QBrush(Qt::red),0)); + scene()->addItem(item); + lines << item; + } lastx = xpos; lasty = ypos; - scene()->addItem(item); - lines << item; poly.append(QPointF(lastx, lasty)); } |