Skip to content

Commit

Permalink
Fix crash in merge features dialog
Browse files Browse the repository at this point in the history
Fixes #19119
  • Loading branch information
nyalldawson committed Jun 6, 2018
1 parent b227425 commit 71f3aaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/app/qgsmergeattributesdialog.cpp
Expand Up @@ -361,10 +361,8 @@ void QgsMergeAttributesDialog::refreshMergedValue( int col )
mUpdating = false;
}

QVariant QgsMergeAttributesDialog::featureAttribute( QgsFeatureId featureId, int col )
QVariant QgsMergeAttributesDialog::featureAttribute( QgsFeatureId featureId, int fieldIdx )
{
int fieldIdx = mTableWidget->horizontalHeaderItem( col )->data( FieldIndex ).toInt();

int i;
for ( i = 0; i < mFeatureList.size() && mFeatureList.at( i ).id() != featureId; i++ )
;
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmergeattributesdialog.h
Expand Up @@ -81,7 +81,7 @@ class APP_EXPORT QgsMergeAttributesDialog: public QDialog, private Ui::QgsMergeA
//! Calculates the merged value of a column (depending on the selected merge behavior) and inserts the value in the corresponding cell
void refreshMergedValue( int col );
//! Inserts the attribute value of a specific feature into the row of merged attributes
QVariant featureAttribute( QgsFeatureId featureId, int col );
QVariant featureAttribute( QgsFeatureId featureId, int fieldIdx );
//! Appends the values of the features for the final value
QVariant concatenationAttribute( int col );

Expand Down

0 comments on commit 71f3aaf

Please sign in to comment.