Skip to content

Commit c34f035

Browse files
committedApr 9, 2015
Followup 43f150d, don't show diagram warnings if diagrams disabled
(fix #12532)
1 parent 4bc0078 commit c34f035

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/app/qgsdiagramproperties.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,13 @@ void QgsDiagramProperties::apply()
521521
QSettings().setValue( "/Windows/VectorLayerProperties/diagram/tab",
522522
mDiagramPropertiesTabWidget->currentIndex() );
523523

524+
bool diagramsEnabled = mDisplayDiagramsGroupBox->isChecked();
525+
524526
QgsDiagram* diagram = 0;
525527
int index = mDiagramTypeComboBox->currentIndex();
526528
QString diagramType = mDiagramTypeComboBox->itemData( index ).toString();
527529

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

571-
if ( maxVal != DBL_MIN )
573+
if ( diagramsEnabled && maxVal != DBL_MIN )
572574
{
573575
QgisApp::instance()->messageBar()->pushMessage(
574576
tr( "Interpolation value" ),

0 commit comments

Comments
 (0)
Please sign in to comment.