Skip to content
Permalink
Browse files
fixes bug when specifying number of classes greater than number of fe…
…atures. Fixes #3325

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14900 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer committed Dec 13, 2010
1 parent 3efdf9a commit 5f386cbf6e89180fa73500792878279d0d39642b
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
@@ -558,6 +558,11 @@ static QList<double> _calcJenksBreaks( QList<double> values, int classes,
}

int n = values.count();
if ( classes >= n )
{
return values;
}

QList<double> sample;

// if we have lots of values, we need to take a random sample
@@ -769,8 +774,6 @@ QgsGraduatedSymbolRendererV2* QgsGraduatedSymbolRendererV2::createRenderer(
return r;
}



QgsFeatureRendererV2* QgsGraduatedSymbolRendererV2::create( QDomElement& element )
{
QDomElement symbolsElem = element.firstChildElement( "symbols" );

0 comments on commit 5f386cb

Please sign in to comment.