Changeset 1508 in josm


Ignore:
Timestamp:
2009-03-19T20:56:26+01:00 (13 years ago)
Author:
stoecker
Message:

close #273 - copy GPX name on convert - patch by xeen

Location:
trunk/src/org/openstreetmap/josm/gui/layer
Files:
3 edited

Legend:

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

    r1499 r1508  
    669669                }
    670670            }
    671             Main.main.addLayer(new OsmDataLayer(ds, tr("Converted from: {0}", GpxLayer.this.name), null));
     671            Main.main.addLayer(new OsmDataLayer(ds, tr("Converted from: {0}", GpxLayer.this.name),
     672                        data.storageFile));
    672673            Main.main.removeLayer(GpxLayer.this);
    673674        }
  • trunk/src/org/openstreetmap/josm/gui/layer/Layer.java

    r1169 r1508  
    1616
    1717/**
    18  * A layer encapsulates the gui componente of one dataset and its representation.
     18 * A layer encapsulates the gui component of one dataset and its representation.
    1919 *
    20  * Some layers may display data directly importet from OSM server. Other only
     20 * Some layers may display data directly imported from OSM server. Other only
    2121 * display background images. Some can be edited, some not. Some are static and
    2222 * other changes dynamically (auto-updated).
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r1499 r1508  
    382382    }
    383383
    384     public static GpxData toGpxData(DataSet data) {
     384    public static GpxData toGpxData(DataSet data, File file) {
    385385        GpxData gpxData = new GpxData();
     386        gpxData.storageFile = file;
    386387        HashSet<Node> doneNodes = new HashSet<Node>();
    387388        for (Way w : data.ways) {
     
    433434
    434435    public GpxData toGpxData() {
    435         return toGpxData(data);
     436        return toGpxData(data, associatedFile);
    436437    }
    437438
Note: See TracChangeset for help on using the changeset viewer.