Ignore:
Timestamp:
2017-05-15T14:14:40+02:00 (3 years ago)
Author:
michael2402
Message:

See #14120: Don't make gpx tracks depend on the isChanged method, use a listener based approach instead.

Location:
trunk/src/org/openstreetmap/josm/io
Files:
2 edited

Legend:

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

    r11675 r12156  
    466466                    currentState = states.pop();
    467467                    convertUrlToLink(currentTrackAttr);
    468                     data.tracks.add(new ImmutableGpxTrack(currentTrack, currentTrackAttr));
     468                    data.addTrack(new ImmutableGpxTrack(currentTrack, currentTrackAttr));
    469469                    break;
    470470                case "name":
     
    497497                    currentState = states.pop();
    498498                    convertUrlToLink(currentRoute.attr);
    499                     data.routes.add(currentRoute);
     499                    data.addRoute(currentRoute);
    500500                    break;
    501501                default: // Do nothing
  • trunk/src/org/openstreetmap/josm/io/GpxWriter.java

    r11374 r12156  
    186186
    187187    private void writeWayPoints() {
    188         for (WayPoint pnt : data.waypoints) {
     188        for (WayPoint pnt : data.getWaypoints()) {
    189189            wayPoint(pnt, WAY_POINT);
    190190        }
     
    192192
    193193    private void writeRoutes() {
    194         for (GpxRoute rte : data.routes) {
     194        for (GpxRoute rte : data.getRoutes()) {
    195195            openln("rte");
    196196            writeAttr(rte, RTE_TRK_KEYS);
     
    203203
    204204    private void writeTracks() {
    205         for (GpxTrack trk : data.tracks) {
     205        for (GpxTrack trk : data.getTracks()) {
    206206            openln("trk");
    207207            writeAttr(trk, RTE_TRK_KEYS);
Note: See TracChangeset for help on using the changeset viewer.