Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 742acf1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/providers/arcgisrest/qgsafsprovider.cpp
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/providers/arcgisrest/qgsafsprovider.h
Expand Up @@ -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;
Expand Down

0 comments on commit 742acf1

Please sign in to comment.