Skip to content
Permalink
Browse files

Correctly handle QVariant::LongLong fields in merge attribute dialog

  • Loading branch information
nyalldawson committed Feb 7, 2016
1 parent 1566e37 commit 0044666486fbb2248f7ca54efae842fdc3875d6d
Showing with 16 additions and 7 deletions.
  1. +16 −7 src/app/qgsmergeattributesdialog.cpp
@@ -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" );

0 comments on commit 0044666

Please sign in to comment.
You can’t perform that action at this time.