From 6e2dd8b9c79c65b89185ff685231dc7f165a1c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-=C3=89tienne=20Lord?= <7397743+pelord@users.noreply.github.com> Date: Thu, 31 Mar 2022 14:44:34 -0400 Subject: [PATCH] Revert "feat(layerSync): prevent refresh of linked layer if applied OGC filters are the same (#1027)" This reverts commit f4affea0d597eda5ac27066181d377acb5af2756. --- packages/geo/src/lib/layer/utils/layerSync-watcher.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/geo/src/lib/layer/utils/layerSync-watcher.ts b/packages/geo/src/lib/layer/utils/layerSync-watcher.ts index 1804769704..32505a3939 100644 --- a/packages/geo/src/lib/layer/utils/layerSync-watcher.ts +++ b/packages/geo/src/lib/layer/utils/layerSync-watcher.ts @@ -173,9 +173,7 @@ export class LayerSyncWatcher extends Watcher { const layerType = layerToApply.ol.getProperties().sourceOptions.type; (layerToApply.dataSource as OgcFilterableDataSource).setOgcFilters(ogcFilters, false); if (layerType === 'wfs') { - if (ogcFilters !== (layerToApply.dataSource as OgcFilterableDataSource).ogcFilters$.value) { - layerToApply.ol.getSource().refresh(); - } + layerToApply.ol.getSource().refresh(); } if (layerType === 'wms') { let appliedOgcFilter; @@ -203,10 +201,8 @@ export class LayerSyncWatcher extends Watcher { l.bidirectionnal !== false && l.linkedIds.indexOf(currentLinkedId) !== -1) { const layerType = layer.ol.getProperties().sourceOptions.type; if (layerType === 'wfs') { - if (ogcFilters !== (layer.dataSource as OgcFilterableDataSource).ogcFilters$.value) { - (layer.dataSource as OgcFilterableDataSource).setOgcFilters(ogcFilters, true); - layer.ol.getSource().refresh(); - } + (layer.dataSource as OgcFilterableDataSource).setOgcFilters(ogcFilters, true); + layer.ol.getSource().refresh(); } if (layerType === 'wms') { let appliedOgcFilter;