Skip to content
Permalink
Browse files

Don't try to update raster layer data source's if they haven't changed

  • Loading branch information
nyalldawson committed May 20, 2020
1 parent f3ae6c1 commit d4a6ef07407938e407b080ad3b538009caf0182d
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/gui/raster/qgsrasterlayerproperties.cpp
@@ -1227,7 +1227,9 @@ void QgsRasterLayerProperties::updateSourceStaticTime()
{
QgsProviderMetadata *metadata = QgsProviderRegistry::instance()->providerMetadata(
mRasterLayer->providerType() );
QVariantMap uri = metadata->decodeUri( mRasterLayer->dataProvider()->dataSourceUri() );
const QVariantMap currentUri = metadata->decodeUri( mRasterLayer->dataProvider()->dataSourceUri() );

QVariantMap uri = currentUri;

if ( mWmstGroup->isVisibleTo( this ) )
uri[ QStringLiteral( "allowTemporalUpdates" ) ] = mWmstGroup->isChecked();
@@ -1276,8 +1278,9 @@ void QgsRasterLayerProperties::updateSourceStaticTime()
qobject_cast< QgsRasterLayerTemporalProperties * >( mRasterLayer->temporalProperties() )->setIntervalHandlingMethod( static_cast< QgsRasterDataProviderTemporalCapabilities::IntervalHandlingMethod >(
mFetchModeComboBox->currentData().toInt() ) );
}
mRasterLayer->setDataSource( metadata->encodeUri( uri ), mRasterLayer->name(), mRasterLayer->providerType(), QgsDataProvider::ProviderOptions() );

if ( currentUri != uri )
mRasterLayer->setDataSource( metadata->encodeUri( uri ), mRasterLayer->name(), mRasterLayer->providerType(), QgsDataProvider::ProviderOptions() );
}

void QgsRasterLayerProperties::setSourceStaticTimeState()

0 comments on commit d4a6ef0

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