summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-06-20 18:02:01 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-06-20 18:02:01 -0300
commit0539a5fab67a83da223425e6fcbf2d8775be90e3 (patch)
tree92e264369e8f8b00df2d832c894cc607c1dc19a1 /qt-ui
parentcbdd78c0fca06645248dafe3999bbabd91c48449 (diff)
downloadsubsurface-0539a5fab67a83da223425e6fcbf2d8775be90e3.tar.gz
Restore the original color of the Handler as soon as mouseRelease.
Restore the original color of the handler as soon as mouseRelease, also a bit of code cleanup. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 33a759f1d..4d9aefcb1 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -47,8 +47,6 @@ DivePlanner::DivePlanner(QWidget* parent): QGraphicsView(parent), activeDraggedH
depthString = new QGraphicsSimpleTextItem();
depthString->setFlag(QGraphicsItem::ItemIgnoresTransformations);
scene()->addItem(depthString);
-
-
}
void DivePlanner::mouseDoubleClickEvent(QMouseEvent* event)
@@ -109,9 +107,6 @@ void DivePlanner::clear_generated_deco()
void DivePlanner::create_deco_stop()
{
- // this needs to create everything
- // for the calculated deco. it should return the *first*
- // line that's calculated, so the
QGraphicsLineItem *item = new QGraphicsLineItem(handles.last()->x(), handles.last()->y(), 100, 0);
scene()->addItem(item);
lines << item;
@@ -227,8 +222,9 @@ void DivePlanner::mouseReleaseEvent(QMouseEvent* event)
{
if (activeDraggedHandler){
QPointF mappedPos = mapToScene(event->pos());
- activeDraggedHandler ->setTime(timeLine->valueAt(mappedPos));
- activeDraggedHandler ->setDepth(depthLine->valueAt(mappedPos));
+ activeDraggedHandler->setTime(timeLine->valueAt(mappedPos));
+ activeDraggedHandler->setDepth(depthLine->valueAt(mappedPos));
+ activeDraggedHandler->setBrush(QBrush());
activeDraggedHandler = 0;
}
}