From 959bdbbca73ec1f288fc38081706dec73b2bd3f1 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 30 Aug 2013 16:21:55 -0300 Subject: Fix '+' sign for time on the planer, plus code cleanup. The plus sign for time was in a very strange position, this puts it back to where it belongs, plus a bit of code cleanup since the planner was in heavily modifications, this will be needed quite a bit. :) Signed-off-by: Tomaz Canabrava --- qt-ui/diveplanner.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'qt-ui/diveplanner.cpp') diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 9ff47792c..08448303f 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -128,7 +128,7 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent) connect(obj, SIGNAL(clicked()), this, SLOT(slot)); ADDBTN(plusDepth, ":plus", "" , 5, 5, tr("Increase maximum depth by 10m"), increaseDepth()); - ADDBTN(plusTime, ":plus", "" , 95, 5, tr("Increase minimum time by 10m"), increaseTime()); + ADDBTN(plusTime, ":plus", "" , 95, 95, tr("Increase minimum time by 10m"), increaseTime()); ADDBTN(lessDepth, ":minimum","" , 2, 5, tr("Decreases maximum depth by 10m"), decreaseDepth()); ADDBTN(lessTime, ":minimum","" , 92, 95, tr("Decreases minimum time by 10m"), decreaseTime()); #undef ADDBTN @@ -169,11 +169,7 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent) void DivePlannerGraphics::pointInserted(const QModelIndex& parent, int start , int end) { - divedatapoint point = plannerModel->at(start); DiveHandler *item = new DiveHandler (); - double xpos = timeLine->posAtValue(point.time / 60); - double ypos = depthLine->posAtValue(point.depth / 1000); - item->setPos(QPointF(xpos, ypos)); scene()->addItem(item); handles << item; -- cgit v1.2.3-70-g09d2