Changeset 9691 in josm for trunk/src/org
- Timestamp:
- 2016-01-31T10:47:29+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r9637 r9691 34 34 import java.util.Arrays; 35 35 import java.util.Collection; 36 import java.util.Comparator; 36 37 import java.util.HashMap; 37 38 import java.util.Hashtable; … … 40 41 import java.util.List; 41 42 import java.util.Map; 43 import java.util.TreeSet; 42 44 import java.util.concurrent.ExecutorService; 43 45 import java.util.concurrent.Executors; … … 1346 1348 // Check if the presets have icons for nodes/relations. 1347 1349 if (!OsmPrimitiveType.WAY.equals(primitive.getType())) { 1348 for (final TaggingPreset preset : TaggingPresets.getMatchingPresets(primitive)) { 1350 final Collection<TaggingPreset> presets = new TreeSet<>(new Comparator<TaggingPreset>() { 1351 @Override 1352 public int compare(TaggingPreset o1, TaggingPreset o2) { 1353 final int o1TypesSize = o1.types == null || o1.types.isEmpty() ? Integer.MAX_VALUE : o1.types.size(); 1354 final int o2TypesSize = o2.types == null || o2.types.isEmpty() ? Integer.MAX_VALUE : o2.types.size(); 1355 return Integer.compare(o1TypesSize, o2TypesSize); 1356 } 1357 }); 1358 presets.addAll(TaggingPresets.getMatchingPresets(primitive)); 1359 for (final TaggingPreset preset : presets) { 1349 1360 if (preset.getIcon() != null) { 1350 1361 return preset.getIcon();
Note:
See TracChangeset
for help on using the changeset viewer.