Skip to content
Permalink
Browse files

[afs] Don't render in preview jobs

These servers can be sloooooooow, and unpredictable.
The previous preview job may have been fast to render,
but the next may take minutes or worse to download...
  • Loading branch information
nyalldawson committed Feb 1, 2019
1 parent 03a2a03 commit 742acf19237662707ecc4d1db04e565b2aea305a
Showing with 8 additions and 0 deletions.
  1. +7 −0 src/providers/arcgisrest/qgsafsprovider.cpp
  2. +1 −0 src/providers/arcgisrest/qgsafsprovider.h
@@ -315,6 +315,13 @@ QgsAbstractVectorLayerLabeling *QgsAfsProvider::createLabeling( const QVariantMa
return QgsArcGisRestUtils::parseEsriLabeling( mLabelingDataList );
}

bool QgsAfsProvider::renderInPreview( const QgsDataProvider::PreviewContext & )
{
// these servers can be sloooooooow, and unpredictable. The previous preview job may have been fast to render,
// but the next may take minutes or worse to download...
return false;
}

#ifdef HAVE_GUI

//! Provider for AFS layers source select
@@ -72,6 +72,7 @@ class QgsAfsProvider : public QgsVectorDataProvider
void reloadData() override;
QgsFeatureRenderer *createRenderer( const QVariantMap &configuration = QVariantMap() ) const override;
QgsAbstractVectorLayerLabeling *createLabeling( const QVariantMap &configuration = QVariantMap() ) const override;
bool renderInPreview( const QgsDataProvider::PreviewContext &context ) override;

private:
bool mValid = false;

0 comments on commit 742acf1

Please sign in to comment.
You can’t perform that action at this time.