Skip to content

Commit 742acf1

Browse files
committed
[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...
1 parent 03a2a03 commit 742acf1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/providers/arcgisrest/qgsafsprovider.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,13 @@ QgsAbstractVectorLayerLabeling *QgsAfsProvider::createLabeling( const QVariantMa
315315
return QgsArcGisRestUtils::parseEsriLabeling( mLabelingDataList );
316316
}
317317

318+
bool QgsAfsProvider::renderInPreview( const QgsDataProvider::PreviewContext & )
319+
{
320+
// these servers can be sloooooooow, and unpredictable. The previous preview job may have been fast to render,
321+
// but the next may take minutes or worse to download...
322+
return false;
323+
}
324+
318325
#ifdef HAVE_GUI
319326

320327
//! Provider for AFS layers source select

src/providers/arcgisrest/qgsafsprovider.h

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class QgsAfsProvider : public QgsVectorDataProvider
7272
void reloadData() override;
7373
QgsFeatureRenderer *createRenderer( const QVariantMap &configuration = QVariantMap() ) const override;
7474
QgsAbstractVectorLayerLabeling *createLabeling( const QVariantMap &configuration = QVariantMap() ) const override;
75+
bool renderInPreview( const QgsDataProvider::PreviewContext &context ) override;
7576

7677
private:
7778
bool mValid = false;

0 commit comments

Comments
 (0)