mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:13:25 +00:00
Don't exit profile editor when hitting ESC in dive add mode
I'm sure there are more issues like this where we need to handle things differently depending on whether we are planning a dive or adding a dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9820ca5eda
commit
799b56a1f3
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue