diff --git a/src/gui/qgsfeaturelistcombobox.cpp b/src/gui/qgsfeaturelistcombobox.cpp index 85aaea6e6a0e..fcdbdd705c39 100644 --- a/src/gui/qgsfeaturelistcombobox.cpp +++ b/src/gui/qgsfeaturelistcombobox.cpp @@ -291,9 +291,11 @@ void QgsFeatureListComboBox::setIdentifierValuesToNull() QgsFeatureRequest QgsFeatureListComboBox::currentFeatureRequest() const { + QgsFeatureRequest request; + request.setRequestMayBeNested( true ); if ( mModel->extraIdentifierValues().isEmpty() ) { - return QgsFeatureRequest().setFilterFids( QgsFeatureIds() ); // NULL: Return a request that's guaranteed to not return anything + request.setFilterFids( QgsFeatureIds() ); // NULL: Return a request that's guaranteed to not return anything } else { @@ -312,8 +314,9 @@ QgsFeatureRequest QgsFeatureListComboBox::currentFeatureRequest() const } } const QString expression = filtersAttrs.join( QLatin1String( " AND " ) ); - return QgsFeatureRequest().setFilterExpression( expression ); + return request.setFilterExpression( expression ); } + return request; } QString QgsFeatureListComboBox::filterExpression() const