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 github-actions[bot] committed Nov 28, 2024
1 parent 0e03cc6 commit 3623670
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 @@ -288,9 +288,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 @@ -309,8 +311,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 3623670

Please sign in to comment.