Skip to content
Permalink
Browse files

Fix context menu options for graduated ranges does nothing

  • Loading branch information
nyalldawson committed Jun 27, 2016
1 parent 5078e46 commit 06343776d382822c2bb9c59eeea3d9c2f18c3a73
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
@@ -1082,10 +1082,14 @@ QList<QgsSymbolV2*> QgsGraduatedSymbolRendererV2Widget::selectedSymbols()

QgsSymbolV2* QgsGraduatedSymbolRendererV2Widget::findSymbolForRange( double lowerBound, double upperBound, const QgsRangeList& ranges ) const
{
int decimalPlaces = mRenderer->labelFormat().precision() + 2;
if ( decimalPlaces < 0 )
decimalPlaces = 0;
double precision = 1.0 / qPow( 10, decimalPlaces );

for ( QgsRangeList::const_iterator it = ranges.begin(); it != ranges.end(); ++it )
{
//range string has been created with option 'f',4
if ( qgsDoubleNear( lowerBound, it->lowerValue(), 0.0001 ) && qgsDoubleNear( upperBound, it->upperValue(), 0.0001 ) )
if ( qgsDoubleNear( lowerBound, it->lowerValue(), precision ) && qgsDoubleNear( upperBound, it->upperValue(), precision ) )
{
return it->symbol();
}

0 comments on commit 0634377

Please sign in to comment.
You can’t perform that action at this time.