profile: show closed-hand cursor while panning

To give visual feedback.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-08-29 08:03:18 +02:00 committed by Dirk Hohndel
parent edf2a2f4f4
commit 50d83ab188

View file

@ -278,6 +278,7 @@ void ProfileWidget2::mousePressEvent(QMouseEvent *event)
panning = true;
panningOriginalMousePosition = mapToScene(event->pos()).x();
panningOriginalProfilePosition = zoomedPosition;
viewport()->setCursor(Qt::ClosedHandCursor);
}
}
@ -297,7 +298,10 @@ void ProfileWidget2::divePlannerHandlerReleased()
void ProfileWidget2::mouseReleaseEvent(QMouseEvent *event)
{
QGraphicsView::mouseReleaseEvent(event);
panning = false;
if (panning) {
panning = false;
viewport()->setCursor(Qt::ArrowCursor);
}
if (currentState == PLAN || currentState == EDIT) {
shouldCalculateMax = true;
replot();