From aef0dd0fa03d32d81279d8b2b72f265b89f33932 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 30 Aug 2013 16:33:54 -0300 Subject: More Code Cleanup. Just a bit of code cleanup so that I don't bloat the software too much. :) Signed-off-by: Tomaz Canabrava --- qt-ui/diveplanner.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'qt-ui') 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 -- cgit v1.2.3-70-g09d2