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
  • Loading branch information
nyalldawson committed May 1, 2018
1 parent 8961ac4 commit 2233bd4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/app/qgsstatisticalsummarydockwidget.cpp
Expand Up @@ -219,10 +219,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 2233bd4

Please sign in to comment.