Skip to content

Commit 9271ef3

Browse files
committedSep 3, 2012
Add warning if no reference value for diagram scaling has been selected.
1 parent af29da6 commit 9271ef3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎src/app/qgsdiagramproperties.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,14 @@ void QgsDiagramProperties::apply()
465465
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 );
466466
}
467467

468+
bool scaleAttributeValueIsNumeric;
469+
mValueLineEdit->text().toDouble( &scaleAttributeValueIsNumeric );
470+
if ( !mFixedSizeCheckBox->isChecked() && !scaleAttributeValueIsNumeric )
471+
{
472+
QMessageBox::warning( this, tr( "No attribute value specified" ),
473+
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 );
474+
}
475+
468476
QgsDiagram* diagram = 0;
469477
int index = mDiagramTypeComboBox->currentIndex();
470478
QString diagramType = mDiagramTypeComboBox->itemData( index ).toString();

0 commit comments

Comments
 (0)