Changeset 67 in josm for src/org/openstreetmap


Ignore:
Timestamp:
2006-03-23T07:50:37+01:00 (19 years ago)
Author:
imi
Message:

disabled GPX export for data with incomplete ways

File:
1 edited

Legend:

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

    r58 r67  
    1414
    1515import org.openstreetmap.josm.Main;
     16import org.openstreetmap.josm.data.osm.LineSegment;
    1617import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1718import org.openstreetmap.josm.io.GpxWriter;
     
    6566                        }
    6667                        FileWriter fileWriter;
    67                         if (ExtensionFileFilter.filters[ExtensionFileFilter.GPX].acceptName(fn))
     68                        if (ExtensionFileFilter.filters[ExtensionFileFilter.GPX].acceptName(fn)) {
     69                                for (LineSegment ls : Main.main.ds.lineSegments) {
     70                                        if (ls.incomplete) {
     71                                                JOptionPane.showMessageDialog(Main.main, "Export of data containing incomplete ways to GPX is not implemented.\nBe aware, that in future versions of JOSM, GPX support will be kept at a minimum.\nPlease use .osm or .xml as extension for the better OSM support.");
     72                                                return;
     73                                        }
     74                                }
    6875                                new GpxWriter(fileWriter = new FileWriter(file), Main.main.ds).output();
    69                         else if (ExtensionFileFilter.filters[ExtensionFileFilter.OSM].acceptName(fn))
     76                        } else if (ExtensionFileFilter.filters[ExtensionFileFilter.OSM].acceptName(fn))
    7077                                OsmWriter.output(fileWriter = new FileWriter(file), Main.main.ds, false);
    7178                        else if (ExtensionFileFilter.filters[ExtensionFileFilter.CSV].acceptName(fn)) {
Note: See TracChangeset for help on using the changeset viewer.