Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid freeze when opening feature form with many relation reference widgets #59625

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading