Skip to content

Commit

Permalink
Chained filters for relation reference search widget
Browse files Browse the repository at this point in the history
Fix #15589
  • Loading branch information
m-kuhn committed Sep 21, 2016
1 parent be636c1 commit 24f3460
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -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 );

Expand Down

0 comments on commit 24f3460

Please sign in to comment.