Skip to content

Commit

Permalink
Update widgets for attributes which have a data provider default value
Browse files Browse the repository at this point in the history
- Apply for widgets which show a key/description instead of the actual
  value
  • Loading branch information
JuhoErvasti committed Dec 18, 2024
1 parent c95d63c commit 69fde6a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/qgsmergeattributesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,15 @@ void QgsMergeAttributesDialog::createTableWidgetContents()
currentComboBox->setCurrentIndex( currentComboBox->findData( QStringLiteral( "manual" ) ) );
currentComboBox->blockSignals( false );
}

const QString widgetType = QgsGui::editorWidgetRegistry()->findBest( mVectorLayer, mFields.at( idx ).name() ).type();

const QStringList updateWidgetFor = QStringList() << QStringLiteral( "ValueMap" )
<< QStringLiteral( "ValueRelation" )
<< QStringLiteral( "RelationReference" );

if ( updateWidgetFor.contains( widgetType ) )
updateManualWidget( j, true );
}
}

Expand Down

0 comments on commit 69fde6a

Please sign in to comment.