Skip to content
Permalink
Browse files
Chained filters for relation reference search widget
Fix #15589
  • Loading branch information
m-kuhn committed Sep 21, 2016
1 parent be636c1 commit 24f34603a10db5a64f4a0afe11558e46869f998e
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.cpp
@@ -183,6 +183,12 @@ void QgsRelationReferenceSearchWidgetWrapper::initWidget( QWidget* editor )
mWidget->setAllowAddFeatures( false );
mWidget->setOpenFormButtonVisible( false );

if ( config( "FilterFields", QVariant() ).isValid() )
{
mWidget->setFilterFields( config( "FilterFields" ).toStringList() );
mWidget->setChainFilters( config( "ChainFilters" ).toBool() );
}

QgsRelation relation = QgsProject::instance()->relationManager()->relation( config( "Relation" ).toString() );
mWidget->setRelation( relation, false );

0 comments on commit 24f3460

Please sign in to comment.