mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Always show WMTS/XYZ layers in preview jobs (to pre-warm cache)
This commit is contained in:
parent
5ee9cdd222
commit
be954585cf
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user