Skip to content

Commit 71f3aaf

Browse files
committed
Fix crash in merge features dialog
Fixes #19119
1 parent b227425 commit 71f3aaf

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/app/qgsmergeattributesdialog.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,8 @@ void QgsMergeAttributesDialog::refreshMergedValue( int col )
361361
mUpdating = false;
362362
}
363363

364-
QVariant QgsMergeAttributesDialog::featureAttribute( QgsFeatureId featureId, int col )
364+
QVariant QgsMergeAttributesDialog::featureAttribute( QgsFeatureId featureId, int fieldIdx )
365365
{
366-
int fieldIdx = mTableWidget->horizontalHeaderItem( col )->data( FieldIndex ).toInt();
367-
368366
int i;
369367
for ( i = 0; i < mFeatureList.size() && mFeatureList.at( i ).id() != featureId; i++ )
370368
;

src/app/qgsmergeattributesdialog.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class APP_EXPORT QgsMergeAttributesDialog: public QDialog, private Ui::QgsMergeA
8181
//! Calculates the merged value of a column (depending on the selected merge behavior) and inserts the value in the corresponding cell
8282
void refreshMergedValue( int col );
8383
//! Inserts the attribute value of a specific feature into the row of merged attributes
84-
QVariant featureAttribute( QgsFeatureId featureId, int col );
84+
QVariant featureAttribute( QgsFeatureId featureId, int fieldIdx );
8585
//! Appends the values of the features for the final value
8686
QVariant concatenationAttribute( int col );
8787

0 commit comments

Comments
 (0)