Changeset 11784 in josm for trunk/src/org


Ignore:
Timestamp:
2017-03-27T22:10:42+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13922 - fix GPX and Note download area computation

Location:
trunk/src/org/openstreetmap/josm/actions/downloadtasks
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java

    r11774 r11784  
    155155                    tr("Markers from {0}", name));
    156156
    157             gpxLayer = addOrMergeLayer(layers.getGpxLayer(), findGpxMergeLayer());
     157            gpxLayer = layers.getGpxLayer();
     158            addOrMergeLayer(gpxLayer, findGpxMergeLayer());
    158159            addOrMergeLayer(layers.getMarkerLayer(), findMarkerMergeLayer(gpxLayer));
    159160
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesTask.java

    r11774 r11784  
    122122            }
    123123
     124            noteLayer = new NoteLayer(notesData, tr("Notes"));
    124125            List<NoteLayer> noteLayers = Main.getLayerManager().getLayersOfType(NoteLayer.class);
    125126            if (!noteLayers.isEmpty()) {
    126                 noteLayer = noteLayers.get(0);
    127                 noteLayer.getNoteData().addNotes(notesData);
     127                noteLayers.get(0).getNoteData().addNotes(notesData);
    128128                if (Main.map != null && zoomAfterDownload) {
    129129                    Main.map.mapView.scheduleZoomTo(new ViewportData(noteLayer.getViewProjectionBounds()));
    130130                }
    131131            } else {
    132                 Main.getLayerManager().addLayer(new NoteLayer(notesData, tr("Notes")), zoomAfterDownload);
     132                Main.getLayerManager().addLayer(noteLayer, zoomAfterDownload);
    133133            }
    134134        }
Note: See TracChangeset for help on using the changeset viewer.