Skip to content

Commit

Permalink
qgselevationprofilecanvas: Directly call cancelJobs in refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitjano authored and nyalldawson committed Oct 23, 2024
1 parent 8e4621a commit fcc7200
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/gui/elevation/qgselevationprofilecanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -864,13 +864,7 @@ void QgsElevationProfileCanvas::refresh()
if ( !mProject || !profileCurve() )
return;

if ( mCurrentJob )
{
mPlotItem->setRenderer( nullptr );
disconnect( mCurrentJob, &QgsProfilePlotRenderer::generationFinished, this, &QgsElevationProfileCanvas::generationFinished );
mCurrentJob->deleteLater();
mCurrentJob = nullptr;
}
cancelJobs();

QgsProfileRequest request( profileCurve()->clone() );
request.setCrs( mCrs );
Expand Down

0 comments on commit fcc7200

Please sign in to comment.