diff --git a/src/ClientApp/src/components/BohrungForm.js b/src/ClientApp/src/components/BohrungForm.js index 487ebc9..b480f77 100644 --- a/src/ClientApp/src/components/BohrungForm.js +++ b/src/ClientApp/src/components/BohrungForm.js @@ -94,8 +94,9 @@ export default function BohrungForm(props) { if (currentBohrung?.geometrie?.coordinates) { const x = currentBohrung.geometrie.coordinates[0]; const y = currentBohrung.geometrie.coordinates[1]; - setValue("x_coordinate", x.toFixed(1), { shouldDirty: true }); - setValue("y_coordinate", y.toFixed(1), { shouldDirty: true }); + const changedFromMapClick = currentBohrung.coordinatesChanged; + setValue("x_coordinate", x.toFixed(1), { shouldDirty: changedFromMapClick }); + setValue("y_coordinate", y.toFixed(1), { shouldDirty: changedFromMapClick }); currentBohrung.coordinatesChanged = false; } }, [currentBohrung, setValue]);