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 f62a0bf commit 1de71c1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,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 1de71c1

Please sign in to comment.