diff --git a/lib/screens/excursion/widgets/strecke_u_spurbedingungen.dart b/lib/screens/excursion/widgets/strecke_u_spurbedingungen.dart index 4457dad..d99f807 100644 --- a/lib/screens/excursion/widgets/strecke_u_spurbedingungen.dart +++ b/lib/screens/excursion/widgets/strecke_u_spurbedingungen.dart @@ -42,18 +42,24 @@ class StreckeUSpurbedingungenState extends State { widget.kmFussController.addListener(onDistanceTravledUpdated); widget.kmRadController.addListener(onDistanceTravledUpdated); - widget.kmAutoController.text = "0"; - widget.kmFussController.text = "0"; - widget.kmRadController.text = "0"; + // if one of the values is "" the excursion is edited for the first time. On which value i check here is unnecessarry + if (widget.kmAutoController.text == "") { + widget.kmAutoController.text = "0"; + widget.kmFussController.text = "0"; + widget.kmRadController.text = "0"; + } // Track Conditions widget.spGutController.addListener(onTrackConditionsUpdated); widget.spMittelController.addListener(onTrackConditionsUpdated); widget.spSchlechtController.addListener(onTrackConditionsUpdated); - widget.spGutController.text = "0"; - widget.spMittelController.text = "0"; - widget.spSchlechtController.text = "0"; + // if one of the values is "" the excursion is edited for the first time. On which value i check here is unnecessarry + if (widget.spGutController.text == "") { + widget.spGutController.text = "0"; + widget.spMittelController.text = "0"; + widget.spSchlechtController.text = "0"; + } }