Skip to content

Commit

Permalink
Make sure heatmap is cancellable
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 7, 2013
1 parent 9a8ad74 commit 0bf17b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/heatmap/heatmap.cpp
Expand Up @@ -204,7 +204,7 @@ void Heatmap::run()
int counter = 0;

QProgressDialog p( tr( "Creating heatmap" ), tr( "Abort" ), 0, totalFeatures, mQGisIface->mainWindow() );
p.setWindowModality( Qt::WindowModal );
p.setWindowModality( Qt::ApplicationModal );
p.show();

QgsFeature myFeature;
Expand All @@ -213,6 +213,7 @@ void Heatmap::run()
{
counter++;
p.setValue( counter );
QApplication::processEvents();
if ( p.wasCanceled() )
{
QMessageBox::information( 0, tr( "Heatmap generation aborted" ), tr( "QGIS will now load the partially-computed raster." ) );
Expand Down

0 comments on commit 0bf17b5

Please sign in to comment.