only nuke if the cancel button is called

This commit is contained in:
Jason Wen
2025-12-12 01:35:57 -05:00
parent 237f11327c
commit de4cd499c7
@@ -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")