Ticket #21469: 21469.mapillary.patch

File 21469.mapillary.patch, 1.7 KB (added by taylor.smock, 3 years ago)

Mapillary specific patch, so I don't lose/forget it

  • src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/layer/geoimage/MapillaryImageEntry.java

    diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/layer/geoimage/MapillaryImageEntry.java b/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/layer/geoimage/MapillaryImageEntry.java
    index faa7fd68f..7762e4e01 100644
    a b public class MapillaryImageEntry  
    160160    }
    161161
    162162    @Override
    163     public void selectNextImage(ImageViewerDialog imageViewerDialog) {
    164         IImageEntry.super.selectNextImage(imageViewerDialog);
    165         this.selectImage(this.getNextImage());
    166     }
    167 
    168     @Override
    169     public void selectPreviousImage(ImageViewerDialog imageViewerDialog) {
    170         IImageEntry.super.selectPreviousImage(imageViewerDialog);
    171         this.selectImage(this.getPreviousImage());
    172     }
    173 
    174     @Override
    175     public void selectFirstImage(ImageViewerDialog imageViewerDialog) {
    176         IImageEntry.super.selectFirstImage(imageViewerDialog);
    177         this.selectImage(this.getFirstImage());
    178     }
    179 
    180     @Override
    181     public void selectLastImage(ImageViewerDialog imageViewerDialog) {
    182         IImageEntry.super.selectLastImage(imageViewerDialog);
    183         this.selectImage(this.getLastImage());
     163    public void selectImage(ImageViewerDialog imageViewerDialog, IImageEntry<?> entry) {
     164        IImageEntry.super.selectImage(imageViewerDialog, entry);
     165        if (entry instanceof MapillaryImageEntry) {
     166            this.selectImage((MapillaryImageEntry) entry);
     167        }
    184168    }
    185169
    186170    private void selectImage(@Nullable final MapillaryImageEntry entry) {