Skip to content
Permalink
Browse files

Load some entries by default in relation reference widget

  • Loading branch information
m-kuhn committed Oct 26, 2017
1 parent fd772dc commit 9c24818d784726ca5fbec3659124c30a0456db9f
Showing with 5 additions and 3 deletions.
  1. +5 −2 src/core/qgsfeaturefiltermodel.cpp
  2. +0 −1 src/core/qgsfeaturefiltermodel_p.h
@@ -326,9 +326,12 @@ void QgsFeatureFilterModel::scheduledReload()
else if ( !mFilterExpression.isEmpty() && !mFilterValue.isEmpty() )
filterClause = QStringLiteral( "(%1) AND ((%2) ILIKE '\%%3\%')" ).arg( mFilterExpression, mDisplayExpression, mFilterValue );

request.setFilterExpression( filterClause );
if ( !filterClause.isEmpty() )
request.setFilterExpression( filterClause );
}
QSet<QString> attributes = request.filterExpression()->referencedColumns();
QSet<QString> attributes;
if ( request.filterExpression() )
attributes = request.filterExpression()->referencedColumns();
attributes << mIdentifierField;
request.setSubsetOfAttributes( attributes, mSourceLayer->fields() );
request.setFlags( QgsFeatureRequest::NoGeometry );
@@ -57,7 +57,6 @@ class QgsFieldExpressionValuesGatherer: public QThread

mIterator = mSource->getFeatures( mRequest );

QgsDebugMsg( QStringLiteral( "New gatherer: %1" ).arg( mRequest.filterExpression()->expression() ) );
mDisplayExpression.prepare( &mExpressionContext );

QgsFeature feat;

0 comments on commit 9c24818

Please sign in to comment.
You can’t perform that action at this time.