Skip to content

Commit

Permalink
Use mouse press to trigger label map tools instead of release
Browse files Browse the repository at this point in the history
Eases the transition from the click-and-drag behaviour, because
clicking and holding will still start the movement.
  • Loading branch information
nyalldawson committed Jun 17, 2019
1 parent ebfce9b commit 260dc91
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolmovelabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void QgsMapToolMoveLabel::canvasMoveEvent( QgsMapMouseEvent *e )
}
}

void QgsMapToolMoveLabel::canvasReleaseEvent( QgsMapMouseEvent *e )
void QgsMapToolMoveLabel::canvasPressEvent( QgsMapMouseEvent *e )
{
if ( !mLabelRubberBand )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolmovelabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class APP_EXPORT QgsMapToolMoveLabel: public QgsMapToolLabel
QgsMapToolMoveLabel( QgsMapCanvas *canvas );

void canvasMoveEvent( QgsMapMouseEvent *e ) override;
void canvasReleaseEvent( QgsMapMouseEvent *e ) override;
void canvasPressEvent( QgsMapMouseEvent *e ) override;
void keyReleaseEvent( QKeyEvent *e ) override;

protected:
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolrotatelabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void QgsMapToolRotateLabel::canvasMoveEvent( QgsMapMouseEvent *e )
}
}

void QgsMapToolRotateLabel::canvasReleaseEvent( QgsMapMouseEvent *e )
void QgsMapToolRotateLabel::canvasPressEvent( QgsMapMouseEvent *e )
{
if ( !mLabelRubberBand )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolrotatelabel.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class APP_EXPORT QgsMapToolRotateLabel: public QgsMapToolLabel
~QgsMapToolRotateLabel() override;

void canvasMoveEvent( QgsMapMouseEvent *e ) override;
void canvasReleaseEvent( QgsMapMouseEvent *e ) override;
void canvasPressEvent( QgsMapMouseEvent *e ) override;
void keyReleaseEvent( QKeyEvent *e ) override;

protected:
Expand Down

0 comments on commit 260dc91

Please sign in to comment.