Changeset 18194 in josm


Ignore:
Timestamp:
2021-09-05T22:35:08+02:00 (3 years ago)
Author:
Don-vip
Message:

see #21144 - use the selected GPX layer as support instead of the faux GPX data from geotagged images

File:
1 edited

Legend:

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

    r18124 r18194  
    2626import java.util.List;
    2727import java.util.Objects;
     28import java.util.Optional;
    2829import java.util.TimeZone;
    2930import java.util.concurrent.TimeUnit;
     
    287288        @Override
    288289        public void actionPerformed(ActionEvent e) {
    289             supportLayer = new CorrelationSupportLayer(yLayer.getFauxGpxData());
    290             supportLayer.getGpxData().addChangeListener(statusBarUpdaterWithRepaint);
    291             MainApplication.getLayerManager().addLayer(supportLayer);
     290            Optional.ofNullable(selectedGPX(true)).ifPresent(gpx -> {
     291                supportLayer = new CorrelationSupportLayer(gpx.data);
     292                supportLayer.getGpxData().addChangeListener(statusBarUpdaterWithRepaint);
     293                MainApplication.getLayerManager().addLayer(supportLayer);
     294            });
    292295        }
    293296    }
Note: See TracChangeset for help on using the changeset viewer.