Skip to content
Permalink
Browse files

Merge pull request #592 from matthias-kuhn/fix-7405

[Fix #7405] Graduated renderer: Feature count 0 with scale or rotation
  • Loading branch information
mhugent committed May 16, 2013
2 parents 36bf93c + b7ef48a commit 2c7eff708846d1386576d83f38d702e89b9d8b1b
@@ -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 2c7eff7

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