mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
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>
This commit is contained in:
parent
effb7e2fac
commit
a7506848b3
1 changed files with 7 additions and 5 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue