Changeset 17633 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2021-03-21T23:20:37+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java
r12881 r17633 26 26 private final transient List<List<String>> dataKeys; 27 27 private final transient List<List<String>> dataValues; 28 private final transient List<String> dataLabels; 28 29 29 30 /** … … 39 40 dataKeys = new ArrayList<>(); 40 41 dataValues = new ArrayList<>(); 42 dataLabels = new ArrayList<>(); 41 43 if (orig != null) { 44 int index = 0; 42 45 for (Map<String, String> m : orig) { 43 46 List<String> keys = new ArrayList<>(); … … 49 52 dataKeys.add(keys); 50 53 dataValues.add(values); 54 dataLabels.add(m.getOrDefault("name", tr("Entry {0}", index + 1))); 55 index++; 51 56 } 52 57 } … … 77 82 @Override 78 83 public String getElementAt(int index) { 79 return tr("Entry {0}", index+1);84 return dataLabels.get(index); 80 85 } 81 86
Note:
See TracChangeset
for help on using the changeset viewer.