File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -635,10 +635,9 @@ QgsLegendSymbolList QgsCategorizedSymbolRendererV2::legendSymbolItems()
635
635
lst << qMakePair ( classAttribute (), ( QgsSymbolV2* )0 );
636
636
}
637
637
638
- QgsCategoryList::const_iterator catIt = mCategories .constBegin ();
639
- for ( ; catIt != mCategories .constEnd (); ++catIt )
638
+ foreach ( const QgsRendererCategoryV2& cat, mCategories )
640
639
{
641
- lst << qMakePair ( catIt-> label (), catIt-> symbol () );
640
+ lst << qMakePair ( cat. label (), cat. symbol () );
642
641
}
643
642
return lst;
644
643
}
Original file line number Diff line number Diff line change @@ -1076,10 +1076,18 @@ QgsLegendSymbolList QgsGraduatedSymbolRendererV2::legendSymbolItems()
1076
1076
lst << qMakePair ( classAttribute (), ( QgsSymbolV2* )0 );
1077
1077
}
1078
1078
1079
- QgsRangeList::const_iterator rangeIt = mRanges .constBegin ();
1080
- for ( ; rangeIt != mRanges .constEnd (); ++rangeIt )
1079
+ foreach ( const QgsRendererRangeV2& range, mRanges )
1081
1080
{
1082
- lst << qMakePair ( rangeIt->label (), rangeIt->symbol () );
1081
+ QgsSymbolV2* symbol;
1082
+ if ( mRotationFieldIdx == -1 && mSizeScaleFieldIdx == -1 )
1083
+ {
1084
+ symbol = range.symbol ();
1085
+ }
1086
+ else
1087
+ {
1088
+ symbol = mTempSymbols [range.symbol ()];
1089
+ }
1090
+ lst << qMakePair ( range.label (), symbol );
1083
1091
}
1084
1092
return lst;
1085
1093
}
You can’t perform that action at this time.
0 commit comments