Skip to content
Permalink
Browse files

If graduated ranges are inconsistent or overlapping then don't allow

changes via the histogram. Prevents ranges from getting even more
mucked up.
  • Loading branch information
nyalldawson committed Jun 12, 2015
1 parent 604f7e5 commit 787e925b5891ea44491648dfe3c58d7ec6c90689
Showing with 12 additions and 2 deletions.
  1. +12 −2 src/gui/symbology-ng/qgsgraduatedhistogramwidget.cpp
@@ -82,11 +82,21 @@ void QgsGraduatedHistogramWidget::drawHistogram()
if ( !mRenderer )
return;

setGraduatedRanges( mRenderer->ranges() );
bool pickerEnabled = false;
if ( !mRenderer->rangesOverlap() && !mRenderer->rangesHaveGaps() && !mRenderer->ranges().isEmpty() )
{
setGraduatedRanges( mRenderer->ranges() );
pickerEnabled = true;
}
else
{
setGraduatedRanges( QgsRangeList() );
}
QgsHistogramWidget::drawHistogram();

// histo picker
mHistoPicker->setEnabled( true );
mHistoPicker->setEnabled( pickerEnabled );
mFilter->blockSignals( !pickerEnabled );
}

void QgsGraduatedHistogramWidget::mousePress( double value )

0 comments on commit 787e925

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