summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-08-30 16:33:54 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-08-30 16:33:54 -0300
commitaef0dd0fa03d32d81279d8b2b72f265b89f33932 (patch)
treedd6fdae84d5307b4c22196076c5262ec7f183bf8 /qt-ui/diveplanner.cpp
parent959bdbbca73ec1f288fc38081706dec73b2bd3f1 (diff)
downloadsubsurface-aef0dd0fa03d32d81279d8b2b72f265b89f33932.tar.gz
More Code Cleanup.
Just a bit of code cleanup so that I don't bloat the software too much. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r--qt-ui/diveplanner.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 08448303f..a42851a84 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -174,7 +174,6 @@ void DivePlannerGraphics::pointInserted(const QModelIndex& parent, int start , i
handles << item;
Button *gasChooseBtn = new Button();
- gasChooseBtn ->setText(tr("Air"));
scene()->addItem(gasChooseBtn);
gasChooseBtn->setZValue(10);
connect(gasChooseBtn, SIGNAL(clicked()), this, SLOT(prepareSelectGas()));
@@ -481,17 +480,12 @@ void DivePlannerGraphics::createDecoStops()
divedatapoint dp = plannerModel->at(i);
DiveHandler *h = handles.at(i);
h->setPos(timeLine->posAtValue(dp.time / 60), depthLine->posAtValue(dp.depth / 1000));
- }
-
- int gasCount = gases.count();
- for(int i = 0; i < gasCount; i++){
- divedatapoint p = plannerModel->at(i);
QPointF p1 = (i == 0) ? QPointF(timeLine->posAtValue(0), depthLine->posAtValue(0)) : handles[i-1]->pos();
QPointF p2 = handles[i]->pos();
QLineF line(p1, p2);
QPointF pos = line.pointAt(0.5);
gases[i]->setPos(pos);
- gases[i]->setText( strForAir(p) );
+ gases[i]->setText( strForAir(dp));
}
// (re-) create the profile with different colors for segments that were