Changeset 15154 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2019-06-02T21:35:31+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #17779 - make sure imagery entries without shapes are displayed in imagery menu

File:
1 edited

Legend:

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

    r15054 r15154  
    152152    private static boolean isPosInOneShapeIfAny(ImageryInfo info, LatLon pos) {
    153153        List<Shape> shapes = info.getBounds().getShapes();
    154         return shapes == null || shapes.stream().anyMatch(s -> s.contains(pos));
     154        return shapes == null || shapes.isEmpty() || shapes.stream().anyMatch(s -> s.contains(pos));
    155155    }
    156156
     
    185185                    .collect(Collectors.toList());
    186186            if (!inViewLayers.isEmpty()) {
    187                 addDynamicSeparator();
     187                if (inViewLayers.stream().anyMatch(i -> i.getImageryCategory() == ImageryCategory.PHOTO)) {
     188                    addDynamicSeparator();
     189                }
    188190                for (ImageryInfo i : inViewLayers) {
    189191                    addDynamic(trackJosmAction(new AddImageryLayerAction(i)), i.getImageryCategory());
Note: See TracChangeset for help on using the changeset viewer.