mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
edf2a2f4f4
commit
50d83ab188
1 changed files with 5 additions and 1 deletions
|
@ -278,6 +278,7 @@ void ProfileWidget2::mousePressEvent(QMouseEvent *event)
|
||||||
panning = true;
|
panning = true;
|
||||||
panningOriginalMousePosition = mapToScene(event->pos()).x();
|
panningOriginalMousePosition = mapToScene(event->pos()).x();
|
||||||
panningOriginalProfilePosition = zoomedPosition;
|
panningOriginalProfilePosition = zoomedPosition;
|
||||||
|
viewport()->setCursor(Qt::ClosedHandCursor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,7 +298,10 @@ void ProfileWidget2::divePlannerHandlerReleased()
|
||||||
void ProfileWidget2::mouseReleaseEvent(QMouseEvent *event)
|
void ProfileWidget2::mouseReleaseEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
QGraphicsView::mouseReleaseEvent(event);
|
QGraphicsView::mouseReleaseEvent(event);
|
||||||
panning = false;
|
if (panning) {
|
||||||
|
panning = false;
|
||||||
|
viewport()->setCursor(Qt::ArrowCursor);
|
||||||
|
}
|
||||||
if (currentState == PLAN || currentState == EDIT) {
|
if (currentState == PLAN || currentState == EDIT) {
|
||||||
shouldCalculateMax = true;
|
shouldCalculateMax = true;
|
||||||
replot();
|
replot();
|
||||||
|
|
Loading…
Add table
Reference in a new issue