Skip to content

Commit 2458eaf

Browse files
committed
Fix symbol size when adding breaks to histogram for graduated size
renderer (fix #12952)
1 parent d8b7796 commit 2458eaf

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp

+11-3
Original file line numberDiff line numberDiff line change
@@ -1454,9 +1454,17 @@ void QgsGraduatedSymbolRendererV2::addBreak( double breakValue, bool updateSymbo
14541454
}
14551455
}
14561456

1457-
if ( updateSymbols && mGraduatedMethod == GraduatedColor )
1457+
if ( updateSymbols )
14581458
{
1459-
updateColorRamp( mSourceColorRamp.data(), mInvertedColorRamp );
1459+
switch ( mGraduatedMethod )
1460+
{
1461+
case GraduatedColor:
1462+
updateColorRamp( mSourceColorRamp.data(), mInvertedColorRamp );
1463+
break;
1464+
case GraduatedSize:
1465+
setSymbolSizes( minSymbolSize(), maxSymbolSize() );
1466+
break;
1467+
}
14601468
}
14611469
}
14621470

@@ -1589,7 +1597,7 @@ bool QgsGraduatedSymbolRendererV2::rangesHaveGaps() const
15891597

15901598
for ( ; it != sortedRanges.constEnd(); ++it )
15911599
{
1592-
if ( !qgsDoubleNear( ( *it ).lowerValue(), prevMax ) )
1600+
if ( !qgsDoubleNear(( *it ).lowerValue(), prevMax ) )
15931601
return true;
15941602

15951603
prevMax = ( *it ).upperValue();

0 commit comments

Comments
 (0)