mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-08 00:02:35 -05:00
fix missing lower bound in ranges
This commit is contained in:
parent
b6278aeb25
commit
8792c4954d
@ -191,7 +191,8 @@ QList<QgsClassificationRange> QgsClassificationMethod::classes( const QgsVectorL
|
||||
}
|
||||
|
||||
// get the breaks
|
||||
const QList<double> breaks = calculateBreaks( minimum, maximum, values, nclasses );
|
||||
QList<double> breaks = calculateBreaks( minimum, maximum, values, nclasses );
|
||||
breaks.insert( 0, minimum );
|
||||
// create classes
|
||||
return breaksToClasses( breaks );
|
||||
}
|
||||
@ -203,7 +204,8 @@ QList<QgsClassificationRange> QgsClassificationMethod::classes( const QList<doub
|
||||
double maximum = *result.second;
|
||||
|
||||
// get the breaks
|
||||
const QList<double> breaks = calculateBreaks( minimum, maximum, values, nclasses );
|
||||
QList<double> breaks = calculateBreaks( minimum, maximum, values, nclasses );
|
||||
breaks.insert( 0, minimum );
|
||||
// create classes
|
||||
return breaksToClasses( breaks );
|
||||
}
|
||||
|
@ -326,8 +326,7 @@ QgsSymbolList QgsGraduatedSymbolRenderer::symbols( QgsRenderContext &context ) c
|
||||
Q_UNUSED( context )
|
||||
QgsSymbolList lst;
|
||||
lst.reserve( mRanges.count() );
|
||||
const auto constMRanges = mRanges;
|
||||
for ( const QgsRendererRange &range : constMRanges )
|
||||
for ( const QgsRendererRange &range : qgis::as_const( mRanges ) )
|
||||
{
|
||||
lst.append( range.symbol() );
|
||||
}
|
||||
@ -336,7 +335,7 @@ QgsSymbolList QgsGraduatedSymbolRenderer::symbols( QgsRenderContext &context ) c
|
||||
|
||||
bool QgsGraduatedSymbolRenderer::accept( QgsStyleEntityVisitorInterface *visitor ) const
|
||||
{
|
||||
for ( const QgsRendererRange &range : mRanges )
|
||||
for ( const QgsRendererRange &range : qgis::as_const( mRanges ) )
|
||||
{
|
||||
QgsStyleSymbolEntity entity( range.symbol() );
|
||||
if ( !visitor->visit( QgsStyleEntityVisitorInterface::StyleLeaf( &entity, QStringLiteral( "%1 - %2" ).arg( range.lowerValue() ).arg( range.upperValue() ), range.label() ) ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user