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 f62a0bf commit 1de71c12d6758f46697827f181ef06c549df6130
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/gui/editorwidgets/qgsrelationreferencesearchwidgetwrapper.cpp
@@ -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 );

0 comments on commit 1de71c1

Please sign in to comment.