Changeset 8996 in josm
- Timestamp:
- 2015-11-07T18:42:58+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r8985 r8996 98 98 import org.openstreetmap.josm.gui.widgets.JosmTextField; 99 99 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher; 100 import org.openstreetmap.josm.tools.AlphanumComparator; 100 101 import org.openstreetmap.josm.tools.GBC; 101 102 import org.openstreetmap.josm.tools.ImageProvider; … … 307 308 tagTable.getColumnModel().getColumn(1).setCellRenderer(cellRenderer); 308 309 tagTable.setRowSorter(tagRowSorter); 310 311 tagRowSorter.setComparator(0, AlphanumComparator.getInstance()); 312 tagRowSorter.setComparator(1, new Comparator<Object>() { 313 @Override 314 public int compare(Object o1, Object o2) { 315 if (o1 instanceof Map && o2 instanceof Map) { 316 final String v1 = ((Map) o1).size() == 1 ? (String) ((Map) o1).keySet().iterator().next() : tr("<different>"); 317 final String v2 = ((Map) o2).size() == 1 ? (String) ((Map) o2).keySet().iterator().next() : tr("<different>"); 318 return AlphanumComparator.getInstance().compare(v1, v2); 319 } else { 320 return AlphanumComparator.getInstance().compare(String.valueOf(o1), String.valueOf(o2)); 321 } 322 } 323 }); 309 324 } 310 325
Note:
See TracChangeset
for help on using the changeset viewer.