Skip to content
Permalink
Browse files

It does not make sense to classify into zero classes, does it?

  • Loading branch information
wonder-sk committed Jul 4, 2011
1 parent 8d28b6e commit 0a3583de31338b7816ad02014bc44a72d92e5bcb
@@ -690,6 +690,8 @@ QgsGraduatedSymbolRendererV2* QgsGraduatedSymbolRendererV2::createRenderer(
QgsSymbolV2* symbol,
QgsVectorColorRampV2* ramp )
{
if ( classes < 1 )
return NULL;

int attrNum = vlayer->fieldNameIndex( attrName );

@@ -176,9 +176,16 @@ void QgsGraduatedSymbolRendererV2Widget::classifyGraduated()
mode = QgsGraduatedSymbolRendererV2::Quantile;

// create and set new renderer
QgsGraduatedSymbolRendererV2* r = QgsGraduatedSymbolRendererV2::createRenderer(
mLayer, attrName, classes, mode, mGraduatedSymbol, ramp );
if ( !r )
{
QMessageBox::critical( this, tr( "Error" ), tr( "Renderer creation has failed." ) );
return;
}

delete mRenderer;
mRenderer = QgsGraduatedSymbolRendererV2::createRenderer(
mLayer, attrName, classes, mode, mGraduatedSymbol, ramp );
mRenderer = r;

populateRanges();
}
@@ -70,6 +70,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>999</number>
</property>
<property name="value">
<number>5</number>
</property>

0 comments on commit 0a3583d

Please sign in to comment.
You can’t perform that action at this time.