Changeset 5795 in josm for trunk/src


Ignore:
Timestamp:
2013-03-22T21:07:01+01:00 (11 years ago)
Author:
Don-vip
Message:

fix #8530 - Robustness to presets defining keys without value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java

    r5792 r5795  
    13321332            return Collections.singleton(value);
    13331333        }
     1334
     1335        @Override
     1336        public String toString() {
     1337            return "Key [key=" + key + ", value=" + value + ", text=" + text
     1338                    + ", text_context=" + text_context + ", match=" + match
     1339                    + "]";
     1340        }
    13341341    }
    13351342
     
    15431550                        if (o instanceof ComboMultiSelect) {
    15441551                            ((ComboMultiSelect) o).addListEntries(listEntries);
     1552                        } else if (o instanceof Key) {
     1553                            if (((Key) o).value == null) {
     1554                                ((Key) o).value = ""; // Fix #8530
     1555                            }
    15451556                        }
    15461557                        listEntries = new LinkedList<PresetListEntry>();
Note: See TracChangeset for help on using the changeset viewer.