Skip to content
Permalink
Browse files

Fix raster temporal properties were never saved

  • Loading branch information
nyalldawson committed Mar 12, 2020
1 parent 835f928 commit eef889a859b2fa940b4906e04bfcdb3c1d861862
@@ -1960,6 +1960,8 @@ bool QgsRasterLayer::readXml( const QDomNode &layer_node, QgsReadWriteContext &c
}
}

mTemporalProperties->readXml( layer_node.toElement(), context );

readStyleManager( layer_node );

return res;
@@ -102,7 +102,7 @@ bool QgsRasterLayerTemporalProperties::readXml( const QDomElement &element, cons
Q_UNUSED( context )
// TODO add support for raster layers with multi-temporal properties.

QDomElement temporalNode = element.elementsByTagName( QStringLiteral( "temporal" ) ).at( 0 ).toElement();
QDomElement temporalNode = element.firstChildElement( QStringLiteral( "temporal" ) );

mMode = static_cast< TemporalMode >( temporalNode.attribute( QStringLiteral( "mode" ), QStringLiteral( "0" ) ). toInt() );
mIntervalHandlingMethod = static_cast< QgsRasterDataProviderTemporalCapabilities::IntervalHandlingMethod >( temporalNode.attribute( QStringLiteral( "fetchMode" ), QStringLiteral( "0" ) ). toInt() );
@@ -1032,9 +1032,6 @@ void QgsRasterLayerProperties::apply()
hueSaturationFilter->setColorizeStrength( sliderColorizeStrength->value() );
}

// Update temporal properties
mTemporalWidget->saveTemporalProperties();

//set the blend mode for the layer
mRasterLayer->setBlendMode( mBlendModeComboBox->blendMode() );

@@ -44,7 +44,7 @@ void QgsRasterLayerTemporalPropertiesWidget::init()
setDateTimeInputsLimit();
setDateTimeInputsLocale();

mFetchModeComboBox->addItem( tr( "Use Whole Temporal Range" ), QgsRasterDataProviderTemporalCapabilities::MatchExactUsingStartOfRange );
mFetchModeComboBox->addItem( tr( "Use Whole Temporal Range" ), QgsRasterDataProviderTemporalCapabilities::MatchUsingWholeRange );
mFetchModeComboBox->addItem( tr( "Match to Start of Range" ), QgsRasterDataProviderTemporalCapabilities::MatchExactUsingStartOfRange );
mFetchModeComboBox->addItem( tr( "Match to End of Range" ), QgsRasterDataProviderTemporalCapabilities::MatchExactUsingEndOfRange );

0 comments on commit eef889a

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