Skip to content

Commit

Permalink
Don't override cursor in pin labels map tool
Browse files Browse the repository at this point in the history
This tool was setting the application cursor after every map render.
It's unnecessary and impolite, and causes bad UX.

Fixes #59016
  • Loading branch information
nyalldawson committed Oct 10, 2024
1 parent 9b25ca2 commit de16c30
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/app/labeling/qgsmaptoolpinlabels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ void QgsMapToolPinLabels::highlightPinnedLabels()

const QList<QgsLabelPosition> labelPosList = labelingResults->labelsWithinRect( ext );

QApplication::setOverrideCursor( Qt::WaitCursor );
for ( const QgsLabelPosition &pos : labelPosList )
{
mCurrentLabel = LabelDetails( pos, canvas() );
Expand Down Expand Up @@ -254,18 +253,15 @@ void QgsMapToolPinLabels::highlightPinnedLabels()
highlightCallout( false, callout, calloutStringID, calloutColor );
}
}
QApplication::restoreOverrideCursor();
}

void QgsMapToolPinLabels::removePinnedHighlights()
{
QApplication::setOverrideCursor( Qt::BusyCursor );
for ( QgsRubberBand *rb : std::as_const( mHighlights ) )
{
delete rb;
}
mHighlights.clear();
QApplication::restoreOverrideCursor();
}

void QgsMapToolPinLabels::pinUnpinLabels( const QgsRectangle &ext, QMouseEvent *e )
Expand Down

0 comments on commit de16c30

Please sign in to comment.