diff options
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index a23d03d03..89da3b4b4 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -340,7 +340,8 @@ void DivePlannerGraphics::keyEscAction() scene()->clearSelection(); return; } - plannerModel->cancelPlan(); + if (DivePlannerPointsModel::instance()->isPlanner()) + plannerModel->cancelPlan(); } qreal DivePlannerGraphics::fromPercent(qreal percent, Qt::Orientation orientation) @@ -602,7 +603,7 @@ void DivePlannerGraphics::mousePressEvent(QMouseEvent* event) return; } - QPointF mappedPos = mapToScene(event->pos()); + QPointF mappedPos = mapToScene(event->pos()); Q_FOREACH(QGraphicsItem *item, scene()->items(mappedPos, Qt::IntersectsItemBoundingRect, Qt::AscendingOrder, transform())){ if (DiveHandler *h = qgraphicsitem_cast<DiveHandler*>(item)) { activeDraggedHandler = h; |