Skip to content
Permalink
Browse files

removed provider capabilities setting in temporal layer properties

  • Loading branch information
Samweli authored and nyalldawson committed Mar 5, 2020
1 parent 4abaee8 commit c178276ef9620b2ae2bff80a08590eaf88ec5336
@@ -228,13 +228,10 @@ QgsRasterLayerRenderer::QgsRasterLayerRenderer( QgsRasterLayer *layer, QgsRender
if ( rasterRenderer && !( rendererContext.flags() & QgsRenderContext::RenderPreviewJob ) )
layer->refreshRendererIfNeeded( rasterRenderer, rendererContext.extent() );

if ( layer && mPipe->provider() && mPipe->provider()->temporalCapabilities() )
if ( renderContext()->isTemporal() && mPipe->provider()->temporalCapabilities() )
{
mPipe->provider()->temporalCapabilities()->setRequestedTemporalRange( layer->temporalProperties()->temporalRange() );
mPipe->provider()->temporalCapabilities()->setRequestedTemporalRange( rendererContext.temporalRange() );
mPipe->provider()->temporalCapabilities()->setRequestedReferenceTemporalRange( layer->temporalProperties()->referenceTemporalRange() );

layer->temporalProperties()->setFixedTemporalRange( mPipe->provider()->temporalCapabilities()->fixedTemporalRange() );
layer->temporalProperties()->setFixedReferenceTemporalRange( mPipe->provider()->temporalCapabilities()->fixedReferenceTemporalRange() );
}

}
@@ -157,12 +157,6 @@ void QgsRasterLayerTemporalPropertiesWidget::saveTemporalProperties()
{
rasterLayer->temporalProperties()->setTemporalRange( normalRange );

if ( rasterLayer->dataProvider() && rasterLayer->dataProvider()->temporalCapabilities() )
{
rasterLayer->dataProvider()->temporalCapabilities()->setEnableTime( !mDisableTime->isChecked() );
rasterLayer->dataProvider()->temporalCapabilities()->setReferenceEnable( mReferenceCheckBox->isChecked() );
}

// Update current selection label
updateRangeLabel( TemporalRangeSource::Layer, mRangeLabel );

@@ -180,15 +174,8 @@ void QgsRasterLayerTemporalPropertiesWidget::saveTemporalProperties()
{
if ( mLayer->type() == QgsMapLayerType::RasterLayer )
{
QgsRasterLayer *rasterLayer = qobject_cast<QgsRasterLayer *> ( mLayer );
// QgsRasterLayer *rasterLayer = qobject_cast<QgsRasterLayer *> ( mLayer );
// rasterLayer->dataProvider()->temporalCapabilities()->setTemporalRange( projectRange );
if ( rasterLayer->dataProvider() && rasterLayer->dataProvider()->temporalCapabilities() )
{
if ( mReferenceCheckBox->isChecked() )
rasterLayer->dataProvider()->temporalCapabilities()->setReferenceEnable( true );
else
rasterLayer->dataProvider()->temporalCapabilities()->setReferenceEnable( false );
}
}
}
}

0 comments on commit c178276

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