Ignore:
Timestamp:
2022-11-09T20:26:24+01:00 (2 years ago)
Author:
taylor.smock
Message:

Fix #21605: Add tabs to ImageViewerDialog for use with different image layers

This allows users to have multiple geotagged image layers, and
quickly switch between them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r18265 r18591  
    172172        this.useThumbs = useThumbs;
    173173        this.data.addImageDataUpdateListener(this);
     174        this.data.setLayer(this);
    174175    }
    175176
     
    232233                } else {
    233234                    data.setSelectedImage(img);
     235                    ImageViewerDialog.getInstance().displayImages(GeoImageLayer.this, Collections.singletonList(img));
    234236                }
    235237            }
     
    522524     */
    523525    public void showCurrentPhoto() {
    524         if (data.getSelectedImage() != null) {
    525             clearOtherCurrentPhotos();
    526         }
    527526        updateBufferAndRepaint();
    528527    }
     
    630629
    631630    /**
    632      * Clears the currentPhoto of the other GeoImageLayer's. Otherwise there could be multiple selected photos.
    633      */
    634     private void clearOtherCurrentPhotos() {
    635         for (GeoImageLayer layer:
    636                  MainApplication.getLayerManager().getLayersOfType(GeoImageLayer.class)) {
    637             if (layer != this) {
    638                 layer.getImageData().clearSelectedImage();
    639             }
    640         }
    641     }
    642 
    643     /**
    644631     * Registers a map mode for which the functionality of this layer should be available.
    645632     * @param mapMode Map mode to be registered
Note: See TracChangeset for help on using the changeset viewer.