Skip to content
Browse files

Add warning if no reference value for diagram scaling has been selected.

  • Loading branch information
m-kuhn committed Sep 3, 2012
1 parent af29da6 commit 9271ef3b2f28c2a0d6dfd02f93e86409e9a5edd6
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/app/qgsdiagramproperties.cpp
@@ -465,6 +465,14 @@ void QgsDiagramProperties::apply()
tr( "You did not add any attributes to this diagram layer. Please specify the attributes to visualize on the diagrams or disable diagrams." ), QMessageBox::Ok );

bool scaleAttributeValueIsNumeric;
mValueLineEdit->text().toDouble( &scaleAttributeValueIsNumeric );
if ( !mFixedSizeCheckBox->isChecked() && !scaleAttributeValueIsNumeric )
QMessageBox::warning( this, tr( "No attribute value specified" ),
tr( "You did not specify a maximum value for the diagram size. Please specify the the attribute and a reference value as a base for scaling in the Tab Diagram / Size." ), QMessageBox::Ok );

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

0 comments on commit 9271ef3

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