[josm-dev] [PATCH] Fix text tagging issues.
Michel Marti
mcdmx at users.sf.net
Mon Dec 15 23:15:59 GMT 2008
While doing some address tagging, I noticed that JOSM will not update
pre-set field values in some cases. Steps to reproduce:
1. Create an empty layer and add two nodes
2. Use preset 'Addresses' of group 'Buildings' on one node
3. Fill in all fields and hit OK
4. Reopen the Address-Tagging-Dialog for the same node and hit OK again
5. Select the other node, enter house-number and hit OK
-> All pre-set fields get ignored
The patch below fixes the problem by clearing the 'original' tag value
(which was left-over by step 4 above) if the key has not yet been used
for the selected element(s).
---
.../josm/gui/tagging/TaggingPreset.java | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java b/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
index fac2576..1d22d4a 100644
--- a/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
+++ b/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
@@ -137,6 +137,7 @@ public class TaggingPreset extends AbstractAction {
} else {
((JTextField)value).setText(default_);
}
+ originalValue = null;
} else if (usage.allSimilar()) {
// all objects use the same value
value = new JTextField();
--
1.5.6.5
More information about the josm-dev
mailing list