Skip to content
Permalink
Browse files
Merge pull request #720 from Oslandia/issue6483
Fix #6483 - Thanks Vincent!
  • Loading branch information
timlinux committed Sep 15, 2013
2 parents a1a95c1 + 6e31245 commit 7e171ef7b0eec2101c60671e7625cfea52688a7e
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
@@ -482,6 +482,15 @@ void QgsGraduatedSymbolRendererV2Widget::classifyGraduated()
else // default should be quantile for now
mode = QgsGraduatedSymbolRendererV2::Quantile;


// Jenks is n^2 complexity, warn for big dataset (more than 50k records)
// and give the user the chance to cancel
if ( QgsGraduatedSymbolRendererV2::Jenks == mode
&& mLayer->featureCount() > 50000 )
{
if ( QMessageBox::Cancel == QMessageBox::question( this, tr( "Warning" ), tr( "Natural break classification (Jenks) is O(n2) complexity, your classification may take a long time.\nPress cancel to abort breaks calculation or OK to continue." ), QMessageBox::Cancel, QMessageBox::Ok ) ) return;
}

// create and set new renderer
QApplication::setOverrideCursor( Qt::WaitCursor );
QgsGraduatedSymbolRendererV2* r = QgsGraduatedSymbolRendererV2::createRenderer(

0 comments on commit 7e171ef

Please sign in to comment.