From bba2caba93f8e1f4d2a386b151c91d4482052f9b Mon Sep 17 00:00:00 2001 From: Bryce Cogswell Date: Sat, 23 Oct 2021 14:58:46 -0700 Subject: [PATCH] Combo presets should also include values from TagInfo: https://github.com/openstreetmap/id-tagging-schema/pull/255#issuecomment-950215505 --- src/Shared/PresetsDatabase/PresetsDatabase+TableView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Shared/PresetsDatabase/PresetsDatabase+TableView.swift b/src/Shared/PresetsDatabase/PresetsDatabase+TableView.swift index f82f49719..31f20ebdc 100644 --- a/src/Shared/PresetsDatabase/PresetsDatabase+TableView.swift +++ b/src/Shared/PresetsDatabase/PresetsDatabase+TableView.swift @@ -531,7 +531,9 @@ extension PresetsDatabase { if type == "typeCombo", ignore.contains(key) { return nil } - let options = dict["options"] as? [String] ?? taginfoFor(key: key, searchKeys: false, update: update) + var options = taginfoFor(key: key, searchKeys: false, update: update) + let options2 = (dict["options"] as? [String] ?? []).filter({ !options.contains($0) }) + options = options2 + options let strings = dict["strings"] as? [String: String] let tag = comboWith( label: label,