fix_7217.patch
src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp | ||
---|---|---|
195 | 195 |
// Null values should not be categorized |
196 | 196 |
if ( attrs[mAttrNum].isNull() ) |
197 | 197 |
return NULL; |
198 |
|
|
199 |
// find the right category
|
|
198 | ||
199 |
// find the right category |
|
200 | 200 |
QgsSymbolV2* symbol = symbolForValue( attrs[mAttrNum].toDouble() ); |
201 | 201 |
if ( symbol == NULL ) |
202 | 202 |
return NULL; |
... | ... | |
806 | 806 |
lst.append( attrNum ); |
807 | 807 | |
808 | 808 |
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFlags( QgsFeatureRequest::NoGeometry ).setSubsetOfAttributes( lst ) ); |
809 |
|
|
809 | ||
810 | 810 |
// create list of non-null attribute values |
811 | 811 |
while ( fit.nextFeature( f ) ) |
812 | 812 |
if ( !f.attribute( attrNum ).isNull() ) |
... | ... | |
983 | 983 |
symbols.insert( symbolName, range.symbol() ); |
984 | 984 | |
985 | 985 |
QDomElement rangeElem = doc.createElement( "range" ); |
986 |
rangeElem.setAttribute( "lower", QString::number( range.lowerValue() ) ); |
|
987 |
rangeElem.setAttribute( "upper", QString::number( range.upperValue() ) ); |
|
986 |
rangeElem.setAttribute( "lower", QString::number( range.lowerValue(), 'f', 4 ) );
|
|
987 |
rangeElem.setAttribute( "upper", QString::number( range.upperValue(), 'f', 4 ) );
|
|
988 | 988 |
rangeElem.setAttribute( "symbol", symbolName ); |
989 | 989 |
rangeElem.setAttribute( "label", range.label() ); |
990 | 990 |
rangesElem.appendChild( rangeElem ); |