Skip to content
Permalink
Browse files

[Fix #7405] Graduated renderer: Feature count 0 with scale or rotation

  • Loading branch information
m-kuhn committed May 15, 2013
1 parent d64ee56 commit b7ef48aee333ad046e1068337a70e322b22fdcf6
@@ -635,10 +635,9 @@ QgsLegendSymbolList QgsCategorizedSymbolRendererV2::legendSymbolItems()
lst << qMakePair( classAttribute(), ( QgsSymbolV2* )0 );
}

QgsCategoryList::const_iterator catIt = mCategories.constBegin();
for ( ; catIt != mCategories.constEnd(); ++catIt )
foreach ( const QgsRendererCategoryV2& cat, mCategories )
{
lst << qMakePair( catIt->label(), catIt->symbol() );
lst << qMakePair( cat.label(), cat.symbol() );
}
return lst;
}
@@ -1076,10 +1076,18 @@ QgsLegendSymbolList QgsGraduatedSymbolRendererV2::legendSymbolItems()
lst << qMakePair( classAttribute(), ( QgsSymbolV2* )0 );
}

QgsRangeList::const_iterator rangeIt = mRanges.constBegin();
for ( ; rangeIt != mRanges.constEnd(); ++rangeIt )
foreach ( const QgsRendererRangeV2& range, mRanges )
{
lst << qMakePair( rangeIt->label(), rangeIt->symbol() );
QgsSymbolV2* symbol;
if ( mRotationFieldIdx == -1 && mSizeScaleFieldIdx == -1 )
{
symbol = range.symbol();
}
else
{
symbol = mTempSymbols[range.symbol()];
}
lst << qMakePair( range.label(), symbol );
}
return lst;
}

0 comments on commit b7ef48a

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