Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Followup 43f150d, don't show diagram warnings if diagrams disabled
(fix #12532)
  • Loading branch information
nyalldawson committed Apr 9, 2015
1 parent 4bc0078 commit c34f035
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/qgsdiagramproperties.cpp
Expand Up @@ -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." ),
Expand Down Expand Up @@ -568,7 +570,7 @@ void QgsDiagramProperties::apply()
}
}

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

0 comments on commit c34f035

Please sign in to comment.