Ignore:
Timestamp:
2014-08-16T04:29:00+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #10165 - Wrong waypoint order in exported GPX

File:
1 edited

Legend:

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

    r7037 r7414  
    3737import org.openstreetmap.josm.tools.GBC;
    3838
     39/**
     40 * Exports data to a .gpx file. Data may be native GPX or OSM data which will be converted.
     41 * @since 1949
     42 */
    3943public class GpxExporter extends FileExporter implements GpxConstants {
    40     private static final String warningGpl = "<html><font color='red' size='-2'>"
     44
     45    private static final String GPL_WARNING = "<html><font color='red' size='-2'>"
    4146        + tr("Note: GPL is not compatible with the OSM license. Do not upload GPL licensed tracks.") + "</html>";
    4247
     
    7479        GpxData gpxData;
    7580        // At this moment, we only need to know the attributes of the GpxData,
    76         // conversion of OsmDataLayer (if needed) will be done after the dialog
    77         // is closed.
     81        // conversion of OsmDataLayer (if needed) will be done after the dialog is closed.
    7882        if (layer instanceof GpxLayer) {
    7983            gpxData = ((GpxLayer) layer).data;
     
    175179        }
    176180
    177        
    178181        try (OutputStream fo = Compression.getCompressedFileOutputStream(file)) {
    179182            new GpxWriter(fo).write(gpxData);
     
    194197        copyrightLabel.setEnabled(enable);
    195198        copyrightYearLabel.setEnabled(enable);
    196         warning.setText(enable ? warningGpl : "<html><font size='-2'>&nbsp;</html");
     199        warning.setText(enable ? GPL_WARNING : "<html><font size='-2'>&nbsp;</html");
    197200
    198201        if (enable) {
     
    220223    /**
    221224     * Add all those listeners to handle the enable state of the fields.
    222      * @param copyrightYearLabel
    223      * @param copyrightLabel
    224      * @param emailLabel
    225      * @param nameLabel
    226      * @param warning
    227225     */
    228226    private static void addDependencies(
     
    299297                    return;
    300298                final String[] urls = {
    301                         "https://creativecommons.org/licenses/by-sa/2.5",
     299                        "https://creativecommons.org/licenses/by-sa/3.0",
    302300                        "http://opendatacommons.org/licenses/odbl/1.0",
    303301                        "public domain",
     
    329327        return Main.main.getCurrentDataSet();
    330328    }
    331 
    332329}
Note: See TracChangeset for help on using the changeset viewer.