UX: attempt to fix #2394

This commit is contained in:
Pieter Vander Vennet 2025-05-04 02:37:57 +02:00
parent 4604fc62e5
commit 156493ef06
6 changed files with 31 additions and 25 deletions

View file

@ -9,6 +9,7 @@ import { FeatureSource, IndexedFeatureSource } from "../../Logic/FeatureSource/F
import { Tag } from "../../Logic/Tags/Tag"
import Hotkeys from "../../UI/Base/Hotkeys"
import Translations from "../../UI/i18n/Translations"
import { Feature } from "geojson"
export class WithLayoutSourceState extends WithSelectedElementState {
readonly layerState: LayerState
@ -127,4 +128,10 @@ export class WithLayoutSourceState extends WithSelectedElementState {
this.featureProperties.trackFeature(feature)
this.selectedElement.setData(feature)
}
protected setSelectedElement(feature: Feature) {
// The given feature might be a partial one from the cache
feature = this.indexedFeatures.featuresById.data?.get(feature.properties.id) ?? feature
super.setSelectedElement(feature)
}
}