diff --git a/src/Logic/State/SearchState.ts b/src/Logic/State/SearchState.ts
index 8672fda09c..cc3e5c1a66 100644
--- a/src/Logic/State/SearchState.ts
+++ b/src/Logic/State/SearchState.ts
@@ -110,12 +110,15 @@ export default class SearchState {
const { layer, filter, index } = payload
for (const [name, otherLayer] of state.layerState.filteredLayers) {
- otherLayer.isDisplayed.setData(name === layer.id)
+ const layer = otherLayer.layerDef
+ if(!layer.isNormal()){
+ continue
+ }
+ otherLayer.isDisplayed.setData(payload.layer.id === layer.id)
}
const flayer = state.layerState.filteredLayers.get(layer.id)
flayer.isDisplayed.set(true)
const filtercontrol = flayer.appliedFilters.get(filter.id)
- console.log("Could not apply", layer.id, ".", filter.id, index)
if (filtercontrol.data === index) {
filtercontrol.setData(undefined)
} else {
@@ -136,6 +139,5 @@ export default class SearchState {
this.state.selectedElement.set(localElement)
return
}
- console.log(">>>",feature)
}
}
diff --git a/src/UI/BigComponents/ThemesList.svelte b/src/UI/BigComponents/ThemesList.svelte
index e59eae6001..82e00e2b89 100644
--- a/src/UI/BigComponents/ThemesList.svelte
+++ b/src/UI/BigComponents/ThemesList.svelte
@@ -24,7 +24,7 @@
{theme}
{state}
>
- {#if $search && hasSelection && themes[0] === theme}
+ {#if $search && hasSelection && themes?.[0] === theme}
@@ -33,7 +33,7 @@
{/each}
- {#if themes.length === 0}
+ {#if themes?.length === 0}
{/if}
diff --git a/src/UI/Search/ActiveFilters.svelte b/src/UI/Search/ActiveFilters.svelte
index c2a8a47c31..8147628e22 100644
--- a/src/UI/Search/ActiveFilters.svelte
+++ b/src/UI/Search/ActiveFilters.svelte
@@ -22,6 +22,9 @@
function enableAllLayers() {
for (const flayer of $nonactiveLayers) {
+ if (!flayer.layerDef.isNormal()) {
+ continue
+ }
flayer.isDisplayed.set(true)
}
}
@@ -41,7 +44,7 @@
}
-{#if activeFilters.length > 0 || $activeLayers.length === 1 || $nonactiveLayers.length > 0}
+{#if activeFilters.length > 0 || $nonactiveLayers.length > 0}
diff --git a/src/UI/Search/FilterResult.svelte b/src/UI/Search/FilterResult.svelte
index 802993ea85..41d385daa3 100644
--- a/src/UI/Search/FilterResult.svelte
+++ b/src/UI/Search/FilterResult.svelte
@@ -19,11 +19,13 @@
function apply() {
loading = true
console.log("Loading is now ", loading)
- window.requestAnimationFrame(() => {
- state.searchState.apply(entry)
- loading = false
- state.searchState.closeIfFullscreen()
- })
+ setTimeout(() => {
+ window.requestAnimationFrame(() => {
+ state.searchState.apply(entry)
+ loading = false
+ state.searchState.closeIfFullscreen()
+ })
+ }, 25)
}