mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
fix #5758
This commit is contained in:
parent
945bfe7745
commit
2d722b1a56
394
i18n/qgis_de.ts
394
i18n/qgis_de.ts
File diff suppressed because it is too large
Load Diff
@ -155,11 +155,13 @@ QComboBox* QgsMergeAttributesDialog::createMergeComboBox( QVariant::Type columnT
|
|||||||
{
|
{
|
||||||
newComboBox->addItem( tr( "Concatenation" ) );
|
newComboBox->addItem( tr( "Concatenation" ) );
|
||||||
}
|
}
|
||||||
if ( columnType == QVariant::Double )
|
else if ( columnType == QVariant::Double )
|
||||||
{
|
{
|
||||||
newComboBox->addItem( tr( "Mean" ) );
|
newComboBox->addItem( tr( "Mean" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newComboBox->addItem( tr( "Skip attribute" ) );
|
||||||
|
|
||||||
QObject::connect( newComboBox, SIGNAL( currentIndexChanged( const QString& ) ),
|
QObject::connect( newComboBox, SIGNAL( currentIndexChanged( const QString& ) ),
|
||||||
this, SLOT( comboValueChanged( const QString& ) ) );
|
this, SLOT( comboValueChanged( const QString& ) ) );
|
||||||
return newComboBox;
|
return newComboBox;
|
||||||
@ -228,13 +230,7 @@ void QgsMergeAttributesDialog::selectedRowChanged()
|
|||||||
|
|
||||||
void QgsMergeAttributesDialog::refreshMergedValue( int col )
|
void QgsMergeAttributesDialog::refreshMergedValue( int col )
|
||||||
{
|
{
|
||||||
//get QComboBox
|
QComboBox* comboBox = qobject_cast<QComboBox *>( mTableWidget->cellWidget( 0, col ) );
|
||||||
QWidget* cellWidget = mTableWidget->cellWidget( 0, col );
|
|
||||||
if ( !cellWidget )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
QComboBox* comboBox = qobject_cast<QComboBox *>( cellWidget );
|
|
||||||
if ( !comboBox )
|
if ( !comboBox )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -267,6 +263,10 @@ void QgsMergeAttributesDialog::refreshMergedValue( int col )
|
|||||||
{
|
{
|
||||||
evalText = concatenationAttributeString( col );
|
evalText = concatenationAttributeString( col );
|
||||||
}
|
}
|
||||||
|
else if ( mergeBehaviourString == tr( "Skip attribute" ) )
|
||||||
|
{
|
||||||
|
evalText = tr( "Skipped" );
|
||||||
|
}
|
||||||
else //an existing feature value
|
else //an existing feature value
|
||||||
{
|
{
|
||||||
int featureId = mergeBehaviourString.split( " " ).at( 1 ).toInt(); //probably not very robust for translations...
|
int featureId = mergeBehaviourString.split( " " ).at( 1 ).toInt(); //probably not very robust for translations...
|
||||||
@ -562,6 +562,10 @@ QgsAttributeMap QgsMergeAttributesDialog::mergedAttributesMap() const
|
|||||||
{
|
{
|
||||||
int idx = mTableWidget->horizontalHeaderItem( i )->data( Qt::UserRole ).toInt();
|
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 );
|
QTableWidgetItem* currentItem = mTableWidget->item( mFeatureList.size() + 1, i );
|
||||||
if ( !currentItem )
|
if ( !currentItem )
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user