Skip to content

Commit 0bf17b5

Browse files
committedMay 7, 2013
Make sure heatmap is cancellable
1 parent 9a8ad74 commit 0bf17b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/plugins/heatmap/heatmap.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ void Heatmap::run()
204204
int counter = 0;
205205

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

210210
QgsFeature myFeature;
@@ -213,6 +213,7 @@ void Heatmap::run()
213213
{
214214
counter++;
215215
p.setValue( counter );
216+
QApplication::processEvents();
216217
if ( p.wasCanceled() )
217218
{
218219
QMessageBox::information( 0, tr( "Heatmap generation aborted" ), tr( "QGIS will now load the partially-computed raster." ) );

0 commit comments

Comments
 (0)
Please sign in to comment.