File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,8 @@ void QgsMergeAttributesDialog::refreshMergedValue( int col )
285
285
return ;
286
286
}
287
287
288
+ int fieldIdx = mTableWidget ->horizontalHeaderItem ( col )->data ( FieldIndex ).toInt ();
289
+
288
290
// evaluate behavior (feature value or min / max / mean )
289
291
QString mergeBehaviorString = comboBox->currentData ().toString ();
290
292
QVariant mergeResult; // result to show in the merge result field
@@ -304,13 +306,13 @@ void QgsMergeAttributesDialog::refreshMergedValue( int col )
304
306
{
305
307
// an existing feature value
306
308
QgsFeatureId featureId = STRING_TO_FID ( mergeBehaviorString.mid ( 1 ) );
307
- mergeResult = featureAttribute ( featureId, col );
309
+ mergeResult = featureAttribute ( featureId, fieldIdx );
308
310
}
309
311
else
310
312
{
311
313
// numerical statistic
312
314
QgsStatisticalSummary::Statistic stat = ( QgsStatisticalSummary::Statistic )( comboBox->currentData ().toInt () );
313
- mergeResult = calcStatistic ( col , stat );
315
+ mergeResult = calcStatistic ( fieldIdx , stat );
314
316
}
315
317
316
318
// insert string into table widget
You can’t perform that action at this time.
0 commit comments