Skip to content

Commit

Permalink
Fix pan tool cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQDQ authored and nyalldawson committed Apr 11, 2023
1 parent 3741853 commit 5f62066
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/gui/layout/qgslayoutviewtoolpan.cpp
Expand Up @@ -36,7 +36,7 @@ void QgsLayoutViewToolPan::layoutPressEvent( QgsLayoutViewMouseEvent *event )

mIsPanning = true;
mLastMousePos = event->pos();
view()->setCursor( Qt::ClosedHandCursor );
view()->viewport()->setCursor( Qt::ClosedHandCursor );
}

void QgsLayoutViewToolPan::layoutMoveEvent( QgsLayoutViewMouseEvent *event )
Expand Down Expand Up @@ -84,7 +84,7 @@ void QgsLayoutViewToolPan::layoutReleaseEvent( QgsLayoutViewMouseEvent *event )
}

mIsPanning = false;
view()->setCursor( Qt::OpenHandCursor );
view()->viewport()->setCursor( Qt::OpenHandCursor );
}

void QgsLayoutViewToolPan::deactivate()
Expand Down
4 changes: 2 additions & 2 deletions src/gui/processing/models/qgsmodelviewtoolpan.cpp
Expand Up @@ -36,7 +36,7 @@ void QgsModelViewToolPan::modelPressEvent( QgsModelViewMouseEvent *event )

mIsPanning = true;
mLastMousePos = event->pos();
view()->setCursor( Qt::ClosedHandCursor );
view()->viewport()->setCursor( Qt::ClosedHandCursor );
}

void QgsModelViewToolPan::modelMoveEvent( QgsModelViewMouseEvent *event )
Expand Down Expand Up @@ -79,7 +79,7 @@ void QgsModelViewToolPan::modelReleaseEvent( QgsModelViewMouseEvent *event )
}

mIsPanning = false;
view()->setCursor( Qt::OpenHandCursor );
view()->viewport()->setCursor( Qt::OpenHandCursor );
}

void QgsModelViewToolPan::deactivate()
Expand Down

0 comments on commit 5f62066

Please sign in to comment.