Skip to content

Commit

Permalink
Add warning if no reference value for diagram scaling has been selected.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 3, 2012
1 parent af29da6 commit 9271ef3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/qgsdiagramproperties.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 9271ef3

Please sign in to comment.