Skip to content

Commit

Permalink
Fix last equal interval break in graduated symbol renderer (#4044)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jul 4, 2011
1 parent 1043c03 commit 88a2a62
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ static QList<double> _calcEqualIntervalBreaks( double minimum, double maximum, i
value += step;
breaks.append( value );
}

// floating point arithmetics is not precise:
// set the last break to be exactly maximum so we do not miss it
breaks[classes-1] = maximum;

return breaks;
}

Expand Down

0 comments on commit 88a2a62

Please sign in to comment.