Skip to content

Commit

Permalink
Fix symbol size when adding breaks to histogram for graduated size
Browse files Browse the repository at this point in the history
renderer (fix #12952)
  • Loading branch information
nyalldawson committed Jun 16, 2015
1 parent d8b7796 commit 2458eaf
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
Expand Up @@ -1454,9 +1454,17 @@ void QgsGraduatedSymbolRendererV2::addBreak( double breakValue, bool updateSymbo
}
}

if ( updateSymbols && mGraduatedMethod == GraduatedColor )
if ( updateSymbols )
{
updateColorRamp( mSourceColorRamp.data(), mInvertedColorRamp );
switch ( mGraduatedMethod )
{
case GraduatedColor:
updateColorRamp( mSourceColorRamp.data(), mInvertedColorRamp );
break;
case GraduatedSize:
setSymbolSizes( minSymbolSize(), maxSymbolSize() );
break;
}
}
}

Expand Down Expand Up @@ -1589,7 +1597,7 @@ bool QgsGraduatedSymbolRendererV2::rangesHaveGaps() const

for ( ; it != sortedRanges.constEnd(); ++it )
{
if ( !qgsDoubleNear( ( *it ).lowerValue(), prevMax ) )
if ( !qgsDoubleNear(( *it ).lowerValue(), prevMax ) )
return true;

prevMax = ( *it ).upperValue();
Expand Down

0 comments on commit 2458eaf

Please sign in to comment.