Skip to content
Permalink
Browse files
Always show WMTS/XYZ layers in preview jobs (to pre-warm cache)
  • Loading branch information
nyalldawson committed Dec 4, 2017
1 parent 5ee9cdd commit be95458
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
@@ -42,7 +42,7 @@ void QgsDataProvider::setListening( bool isListening )
Q_UNUSED( isListening );
}

bool QgsDataProvider::renderInPreview( QgsDataProvider::PreviewContext context )
bool QgsDataProvider::renderInPreview( const PreviewContext &context )
{
return context.lastRenderingTimeMs <= context.maxRenderingTimeMs;
}
@@ -490,7 +490,7 @@ class CORE_EXPORT QgsDataProvider : public QObject
*
* \note not available in Python bindings
*/
virtual bool renderInPreview( QgsDataProvider::PreviewContext context ); // SIP_SKIP
virtual bool renderInPreview( const QgsDataProvider::PreviewContext &context ); // SIP_SKIP

signals:

@@ -3199,18 +3199,25 @@ QString QgsWmsProvider::lastErrorFormat()
QString QgsWmsProvider::name() const
{
return WMS_KEY;
} // QgsWmsProvider::name()
}


QString QgsWmsProvider::description() const
{
return WMS_DESCRIPTION;
} // QgsWmsProvider::description()
}

void QgsWmsProvider::reloadData()
{
}

bool QgsWmsProvider::renderInPreview( const QgsDataProvider::PreviewContext &context )
{
if ( mSettings.mTiled || mSettings.mXyz )
return true;

return QgsRasterDataProvider::renderInPreview( context );
}

QVector<QgsWmsSupportedFormat> QgsWmsProvider::supportedFormats()
{
@@ -208,6 +208,7 @@ class QgsWmsProvider : public QgsRasterDataProvider
QString name() const override;
QString description() const override;
virtual void reloadData() override;
bool renderInPreview( const QgsDataProvider::PreviewContext &context ) override;

static QVector<QgsWmsSupportedFormat> supportedFormats();

0 comments on commit be95458

Please sign in to comment.