Skip to content

Commit

Permalink
fix bug in max value on joined fields
Browse files Browse the repository at this point in the history
  • Loading branch information
vmora committed Jan 16, 2014
1 parent 8b6d180 commit 80b44a7
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) //get maximum value from provider (ignoring not-commited edits)
if ( mLayer ) if ( mLayer )
{ {
QgsVectorDataProvider* provider = mLayer->dataProvider(); // condition removed, keep this useless scope to avoid screewing diff (easier to review)
if ( provider )
{ {
float maxValue = 0; float maxValue = 0;
if ( mSizeAttributeComboBox->currentIndex() >= mAvailableAttributes ) if ( mSizeAttributeComboBox->currentIndex() >= mAvailableAttributes )
Expand All @@ -469,7 +468,7 @@ void QgsDiagramProperties::on_mFindMaximumValueButton_clicked()
} }
else 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 ) ); mValueLineEdit->setText( QString( "%1" ).arg( maxValue ) );
} }
Expand Down

0 comments on commit 80b44a7

Please sign in to comment.