Changeset 2235 in josm


Ignore:
Timestamp:
Oct 3, 2009 2:50:10 PM (4 years ago)
Author:
Gubaer
Message:

fixed #3182: GPX consisting of only markers loads as two layers instead of one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/GpxImporter.java

    r2062 r2235  
    5353            Runnable task = new Runnable() { 
    5454                public void run() { 
    55                     Main.main.addLayer(gpxLayer); 
    56                     if (Main.pref.getBoolean("marker.makeautomarkers", true)) { 
     55                    if (!r.data.tracks.isEmpty() || ! r.data.routes.isEmpty()) { 
     56                        Main.main.addLayer(gpxLayer); 
     57                    } 
     58                    if (Main.pref.getBoolean("marker.makeautomarkers", true) && !r.data.waypoints.isEmpty()) { 
    5759                        MarkerLayer ml = new MarkerLayer(r.data, tr("Markers from {0}", fn), file, gpxLayer); 
    5860                        if (ml.data.size() > 0) { 
Note: See TracChangeset for help on using the changeset viewer.