Skip to content

Commit

Permalink
Fix stats dock handling when refresh is clicked lots of times quickly
Browse files Browse the repository at this point in the history
(cherry-picked from 2233bd4)
  • Loading branch information
nyalldawson committed May 3, 2018
1 parent 21c5eaf commit e744455
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/app/qgsstatisticalsummarydockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,16 @@ void QgsStatisticalSummaryDockWidget::refreshStatistics()

void QgsStatisticalSummaryDockWidget::gathererFinished()
{
mGatherer = nullptr;
mCalculatingProgressBar->setValue( -1 );
mCancelButton->hide();
mCalculatingProgressBar->hide();
QgsStatisticsValueGatherer *gatherer = qobject_cast<QgsStatisticsValueGatherer *>( QObject::sender() );
// this may have been sent from a gathererer which was canceled previously and we don't care
// about it anymore...
if ( gatherer == mGatherer )
{
mGatherer = nullptr;
mCalculatingProgressBar->setValue( -1 );
mCancelButton->hide();
mCalculatingProgressBar->hide();
}
}

void QgsStatisticalSummaryDockWidget::updateNumericStatistics()
Expand Down

0 comments on commit e744455

Please sign in to comment.