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


Ignore:
Timestamp:
2017-10-30T01:20:53+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #6135 - Correlate GPX with image: fix incorrect drop-down list initialization after using "try again" button + smarter selection of initial GPX track

File:
1 edited

Legend:

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

    r12846 r13056  
    546546        // Construct the list of loaded GPX tracks
    547547        Collection<Layer> layerLst = MainApplication.getLayerManager().getLayers();
     548        gpxLst.clear();
    548549        GpxDataWrapper defaultItem = null;
    549550        for (Layer cur : layerLst) {
     
    574575        if (defaultItem != null) {
    575576            cbGpx.setSelectedItem(defaultItem);
     577        } else {
     578            // select first GPX track associated to a file
     579            for (GpxDataWrapper item : gpxLst) {
     580                if (item.file != null) {
     581                    cbGpx.setSelectedItem(item);
     582                    break;
     583                }
     584            }
    576585        }
    577586        cbGpx.addActionListener(statusBarUpdaterWithRepaint);
Note: See TracChangeset for help on using the changeset viewer.