From 50d83ab188db2b26bf2059956cbedf97f447c43f Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 29 Aug 2022 08:03:18 +0200 Subject: [PATCH] profile: show closed-hand cursor while panning To give visual feedback. Signed-off-by: Berthold Stoeger --- profile-widget/profilewidget2.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 819f0a0da..549aa982e 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -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();