mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Disable feature fetching for symbol selector widget preview
It's just too expensive for any remote provider, e.g. wfs, and causes many ui lockups. Revisit when support for iterator timeouts is more mature.
This commit is contained in:
parent
291224e8c7
commit
b422504c37
@ -253,11 +253,15 @@ QgsSymbolSelectorWidget::QgsSymbolSelectorWidget( QgsSymbol *symbol, QgsStyle *s
|
||||
//get first feature from layer for previews
|
||||
if ( mVectorLayer )
|
||||
{
|
||||
#if 0 // this is too expensive to do for many providers. TODO revisit when support for connection timeouts is complete across all providers
|
||||
// short timeout for request - it doesn't really matter if we don't get the feature, and this call is blocking UI
|
||||
QgsFeatureIterator it = mVectorLayer->getFeatures( QgsFeatureRequest().setLimit( 1 ).setConnectionTimeout( 100 ) );
|
||||
it.nextFeature( mPreviewFeature );
|
||||
#endif
|
||||
mPreviewExpressionContext.appendScopes( QgsExpressionContextUtils::globalProjectLayerScopes( mVectorLayer ) );
|
||||
#if 0
|
||||
mPreviewExpressionContext.setFeature( mPreviewFeature );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user