Changeset 482 in josm


Ignore:
Timestamp:
2007-12-02T23:57:42+01:00 (17 years ago)
Author:
framm
Message:
  • do not create empty MarkerLayers; suggestion from Dave Hansen
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/OpenAction.java

    r460 r482  
    9494                        r.data.storageFile = file;
    9595                        Main.main.addLayer(new GpxLayer(r.data, fn));
    96             Main.main.addLayer(new MarkerLayer(r.data, tr("Markers from {0}", fn), file));
     96            MarkerLayer ml = new MarkerLayer(r.data, tr("Markers from {0}", fn), file);
     97            if (ml.data.size() > 0) {
     98                Main.main.addLayer(ml);
     99            }
    97100
    98101                } else {
Note: See TracChangeset for help on using the changeset viewer.