Skip to content
Permalink
Browse files

Followup 43f150d, don't show diagram warnings if diagrams disabled

(fix #12532)
  • Loading branch information
nyalldawson committed Apr 9, 2015
1 parent 4bc0078 commit c34f035cf667525b0afafb19be2d45409d201a8c
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/app/qgsdiagramproperties.cpp
@@ -521,11 +521,13 @@ void QgsDiagramProperties::apply()
QSettings().setValue( "/Windows/VectorLayerProperties/diagram/tab",
mDiagramPropertiesTabWidget->currentIndex() );

bool diagramsEnabled = mDisplayDiagramsGroupBox->isChecked();

QgsDiagram* diagram = 0;
int index = mDiagramTypeComboBox->currentIndex();
QString diagramType = mDiagramTypeComboBox->itemData( index ).toString();

if ( 0 == mDiagramAttributesTreeWidget->topLevelItemCount() )
if ( diagramsEnabled && 0 == mDiagramAttributesTreeWidget->topLevelItemCount() )
{
QgisApp::instance()->messageBar()->pushMessage(
tr( "Diagrams: No attributes added." ),
@@ -568,7 +570,7 @@ void QgsDiagramProperties::apply()
}
}

if ( maxVal != DBL_MIN )
if ( diagramsEnabled && maxVal != DBL_MIN )
{
QgisApp::instance()->messageBar()->pushMessage(
tr( "Interpolation value" ),

0 comments on commit c34f035

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