Skip to content
Permalink
Browse files

Add a tooltip to describe why graduated histogram isn't editable

  • Loading branch information
nyalldawson committed Jun 12, 2015
1 parent 86a45d4 commit 426465d52734f46e361237a174263d2735eabc14
Showing with 16 additions and 4 deletions.
  1. +16 −4 src/gui/symbology-ng/qgsgraduatedhistogramwidget.cpp
@@ -85,15 +85,27 @@ void QgsGraduatedHistogramWidget::drawHistogram()
return;

bool pickerEnabled = false;
if ( !mRenderer->rangesOverlap() && !mRenderer->rangesHaveGaps() && !mRenderer->ranges().isEmpty() )
if ( mRenderer->rangesOverlap() )
{
setGraduatedRanges( mRenderer->ranges() );
pickerEnabled = true;
setToolTip( tr( "Ranges are overlapping and can't be edited by the histogram" ) );
setGraduatedRanges( QgsRangeList() );
}
else
else if ( mRenderer->rangesHaveGaps() )
{
setToolTip( tr( "Ranges have gaps and can't be edited by the histogram" ) );
setGraduatedRanges( QgsRangeList() );
}
else if ( mRenderer->ranges().isEmpty() )
{
setToolTip( QString() );
setGraduatedRanges( QgsRangeList() );
}
else
{
setToolTip( QString() );
setGraduatedRanges( mRenderer->ranges() );
pickerEnabled = true;
}
QgsHistogramWidget::drawHistogram();

// histo picker

0 comments on commit 426465d

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