Ticket #2273: FixConvertActions.patch
File FixConvertActions.patch, 2.3 KB (added by , 16 years ago) |
---|
-
src/org/openstreetmap/josm/gui/layer/GpxLayer.java
668 668 ds.ways.add(w); 669 669 } 670 670 } 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)); 672 673 Main.main.removeLayer(GpxLayer.this); 673 674 } 674 675 } -
src/org/openstreetmap/josm/gui/layer/Layer.java
15 15 import org.openstreetmap.josm.tools.Destroyable; 16 16 17 17 /** 18 * A layer encapsulates the gui component eof one dataset and its representation.18 * A layer encapsulates the gui component of one dataset and its representation. 19 19 * 20 * Some layers may display data directly importe tfrom OSM server. Other only20 * Some layers may display data directly imported from OSM server. Other only 21 21 * display background images. Some can be edited, some not. Some are static and 22 22 * other changes dynamically (auto-updated). 23 23 * -
src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
381 381 } 382 382 } 383 383 384 public static GpxData toGpxData(DataSet data ) {384 public static GpxData toGpxData(DataSet data, File file) { 385 385 GpxData gpxData = new GpxData(); 386 gpxData.storageFile = file; 386 387 HashSet<Node> doneNodes = new HashSet<Node>(); 387 388 for (Way w : data.ways) { 388 389 if (w.incomplete || w.deleted) continue; … … 432 433 } 433 434 434 435 public GpxData toGpxData() { 435 return toGpxData(data );436 return toGpxData(data, associatedFile); 436 437 } 437 438 438 439 public class ConvertToGpxLayerAction extends AbstractAction {