Skip to content

Commit

Permalink
Merge pull request #1083 from Oslandia/fix_max_on_joined_fields
Browse files Browse the repository at this point in the history
fix bug in max value on joined fields
  • Loading branch information
jef-n committed Jan 23, 2014
2 parents 3568fe7 + 80b44a7 commit eb92999
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/qgsdiagramproperties.cpp
Expand Up @@ -445,8 +445,7 @@ void QgsDiagramProperties::on_mFindMaximumValueButton_clicked()
//get maximum value from provider (ignoring not-commited edits)
if ( mLayer )
{
QgsVectorDataProvider* provider = mLayer->dataProvider();
if ( provider )
// condition removed, keep this useless scope to avoid screewing diff (easier to review)
{
float maxValue = 0;
if ( mSizeAttributeComboBox->currentIndex() >= mAvailableAttributes )
Expand All @@ -469,7 +468,7 @@ void QgsDiagramProperties::on_mFindMaximumValueButton_clicked()
}
else
{
maxValue = provider->maximumValue( mSizeAttributeComboBox->itemData( mSizeAttributeComboBox->currentIndex() ).toInt() ).toFloat();
maxValue = mLayer->maximumValue( mSizeAttributeComboBox->itemData( mSizeAttributeComboBox->currentIndex() ).toInt() ).toFloat();
}
mValueLineEdit->setText( QString( "%1" ).arg( maxValue ) );
}
Expand Down

0 comments on commit eb92999

Please sign in to comment.