From a63d61042db1bef9bbd56cad9771fa97ebd3f5ac Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 18 Nov 2013 22:34:59 -0200 Subject: Change the order of the increase / decrease buttons on the planner. Change the order of the increase / decrease depth button on the planner since 'bottom' means increase depth and 'top' means decrease. Sorry I'm too undiver currently :) See #269 Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'qt-ui/diveplanner.cpp') diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 7c9263adb..081f7f60d 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -148,8 +148,10 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent) depthHandler->increaseBtn->setPixmap(QString(":arrow_up")); depthHandler->decreaseBtn->setPixmap(QString(":arrow_down")); depthHandler->icon->setPixmap(QString(":icon_depth")); - connect(depthHandler->increaseBtn, SIGNAL(clicked()), this, SLOT(increaseDepth())); - connect(depthHandler->decreaseBtn, SIGNAL(clicked()), this, SLOT(decreaseDepth())); + // Inverted here in the slots because the 'up' graphi should increase the depness, + // and the down should decrease. + connect(depthHandler->increaseBtn, SIGNAL(clicked()), this, SLOT(decreaseDepth())); + connect(depthHandler->decreaseBtn, SIGNAL(clicked()), this, SLOT(increaseDepth())); depthHandler->setPos(fromPercent(0, Qt::Horizontal), fromPercent(100, Qt::Vertical)); depthHandler->setZValue(-2); scene()->addItem(depthHandler); -- cgit v1.2.3-70-g09d2