Skip to content

Commit

Permalink
Avoid freeze when opening feature form with many relation widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nyalldawson committed Nov 28, 2024
1 parent 9b3ea77 commit 9251f48
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gui/qgsfeaturelistcombobox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
Expand Down

0 comments on commit 9251f48

Please sign in to comment.