Skip to content

Commit

Permalink
Re-add the progress bar to the calculator
Browse files Browse the repository at this point in the history
Fixes #20583 - Raster calculator freezes the GUI with big rasters

... even if it is frozen while reding the raster,
at least it allows to abort the process later
  • Loading branch information
elpaso committed Dec 5, 2018
1 parent 29abab0 commit 273a71a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -5660,6 +5660,7 @@ void QgisApp::showRasterCalculator()
QgsFeedback feedback;
connect( &feedback, &QgsFeedback::progressChanged, &p, &QProgressDialog::setValue );
connect( &p, &QProgressDialog::canceled, &feedback, &QgsFeedback::cancel );
p.show();
QgsRasterCalculator::Result res = static_cast< QgsRasterCalculator::Result >( rc.processCalculation( &feedback ) );
switch ( res )
{
Expand Down Expand Up @@ -5706,6 +5707,7 @@ void QgisApp::showRasterCalculator()
Qgis::Critical );
break;
}
p.hide();
}
}

Expand Down

0 comments on commit 273a71a

Please sign in to comment.