Skip to content

Commit

Permalink
Correctly handle QVariant::LongLong fields in merge attribute dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 7, 2016
1 parent 1566e37 commit 0044666
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions src/app/qgsmergeattributesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,25 @@ QComboBox *QgsMergeAttributesDialog::createMergeComboBox( QVariant::Type columnT
newComboBox->addItem( tr( "Feature %1" ).arg( f_it->id() ), QString( "f%1" ).arg( FID_TO_STRING( f_it->id() ) ) );
}

if ( columnType == QVariant::Double || columnType == QVariant::Int )
switch ( columnType )
{
Q_FOREACH ( QgsStatisticalSummary::Statistic stat, mDisplayStats )
case QVariant::Double:
case QVariant::Int:
case QVariant::LongLong:
{
newComboBox->addItem( QgsStatisticalSummary::displayName( stat ) , stat );
Q_FOREACH ( QgsStatisticalSummary::Statistic stat, mDisplayStats )
{
newComboBox->addItem( QgsStatisticalSummary::displayName( stat ) , stat );
}
break;
}
}
else if ( columnType == QVariant::String )
{
newComboBox->addItem( tr( "Concatenation" ), "concat" );
case QVariant::String:
newComboBox->addItem( tr( "Concatenation" ), "concat" );
break;

//TODO - add date/time/datetime handling
default:
break;
}

newComboBox->addItem( tr( "Skip attribute" ), "skip" );
Expand Down

0 comments on commit 0044666

Please sign in to comment.