diff --git a/selfdrive/ui/sunnypilot/layouts/settings/osm.py b/selfdrive/ui/sunnypilot/layouts/settings/osm.py index 9db5a47fac..acd2c00e81 100644 --- a/selfdrive/ui/sunnypilot/layouts/settings/osm.py +++ b/selfdrive/ui/sunnypilot/layouts/settings/osm.py @@ -112,7 +112,7 @@ class OSMLayout(Widget): def _handle_region_selection(self, region_type, locations, key, res, ref): if res != DialogResult.CONFIRM or not ref: - if region_type == "State": + if region_type == "State" and res == DialogResult.CANCEL: if ui_state.params.get("OsmLocationName") == "US" and not ui_state.params.get("OsmStateName"): ui_state.params.remove("OsmLocationName") ui_state.params.remove("OsmLocationTitle")