Skip to content
Permalink
Browse files

Fix merge features with PG tables

Fixes #34269

By moving the refreshMergedValue() at the end of
createTableWidgetContents() we set the correct
behavior (skipped, manual etc.) after it has been
possibly changed to "manual" a few lines above.

The previous implementation was settings the values
to "skipped" then calling refreshMergedValue(), then
possibly changing to "manual" without refereshing
the merged values, this was the source of the issue.
  • Loading branch information
elpaso committed Feb 4, 2020
1 parent f1a886a commit 9b99dababf07b320236a3baf5487c97c7bcc39fa
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/app/qgsmergeattributesdialog.cpp
@@ -170,12 +170,6 @@ void QgsMergeAttributesDialog::createTableWidgetContents()
mTableWidget->setItem( mTableWidget->rowCount() - 1, j, mergedItem );
}

//insert currently merged values
for ( int i = 0; i < mTableWidget->columnCount(); ++i )
{
refreshMergedValue( i );
}

//initially set any fields with default values/default value clauses to that value
for ( int j = 0; j < mTableWidget->columnCount(); j++ )
{
@@ -207,6 +201,12 @@ void QgsMergeAttributesDialog::createTableWidgetContents()
}
}

//insert currently merged values
for ( int i = 0; i < mTableWidget->columnCount(); ++i )
{
refreshMergedValue( i );
}

}

QComboBox *QgsMergeAttributesDialog::createMergeComboBox( QVariant::Type columnType ) const

0 comments on commit 9b99dab

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