394 changes: 197 additions & 197 deletions i18n/qgis_de.ts

Large diffs are not rendered by default.

20 changes: 12 additions & 8 deletions src/app/qgsmergeattributesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,13 @@ QComboBox* QgsMergeAttributesDialog::createMergeComboBox( QVariant::Type columnT
{
newComboBox->addItem( tr( "Concatenation" ) );
}
if ( columnType == QVariant::Double )
else if ( columnType == QVariant::Double )
{
newComboBox->addItem( tr( "Mean" ) );
}

newComboBox->addItem( tr( "Skip attribute" ) );

QObject::connect( newComboBox, SIGNAL( currentIndexChanged( const QString& ) ),
this, SLOT( comboValueChanged( const QString& ) ) );
return newComboBox;
Expand Down Expand Up @@ -228,13 +230,7 @@ void QgsMergeAttributesDialog::selectedRowChanged()

void QgsMergeAttributesDialog::refreshMergedValue( int col )
{
//get QComboBox
QWidget* cellWidget = mTableWidget->cellWidget( 0, col );
if ( !cellWidget )
{
return;
}
QComboBox* comboBox = qobject_cast<QComboBox *>( cellWidget );
QComboBox* comboBox = qobject_cast<QComboBox *>( mTableWidget->cellWidget( 0, col ) );
if ( !comboBox )
{
return;
Expand Down Expand Up @@ -267,6 +263,10 @@ void QgsMergeAttributesDialog::refreshMergedValue( int col )
{
evalText = concatenationAttributeString( col );
}
else if ( mergeBehaviourString == tr( "Skip attribute" ) )
{
evalText = tr( "Skipped" );
}
else //an existing feature value
{
int featureId = mergeBehaviourString.split( " " ).at( 1 ).toInt(); //probably not very robust for translations...
Expand Down Expand Up @@ -562,6 +562,10 @@ QgsAttributeMap QgsMergeAttributesDialog::mergedAttributesMap() const
{
int idx = mTableWidget->horizontalHeaderItem( i )->data( Qt::UserRole ).toInt();

QComboBox* comboBox = qobject_cast<QComboBox *>( mTableWidget->cellWidget( 0, i ) );
if ( comboBox && comboBox->currentText() == tr( "Skip attribute" ) )
continue;

QTableWidgetItem* currentItem = mTableWidget->item( mFeatureList.size() + 1, i );
if ( !currentItem )
continue;
Expand Down