Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixes bug when specifying number of classes greater than number of fe…
…atures. Fixes #3325

git-svn-id: http://svn.osgeo.org/qgis/trunk@14900 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
cfarmer committed Dec 13, 2010
1 parent 46ea6d7 commit c4413b6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -769,8 +774,6 @@ QgsGraduatedSymbolRendererV2* QgsGraduatedSymbolRendererV2::createRenderer(
return r;
}



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

0 comments on commit c4413b6

Please sign in to comment.