Changeset 13855 in josm for trunk/src/org


Ignore:
Timestamp:
2018-05-27T00:23:36+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #11304 - preserve zoom after OSM layer <-> GPX layer conversion

Location:
trunk/src/org/openstreetmap/josm/gui/layer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r13852 r13855  
    904904                gpxLayer.setAssociatedFile(new File(getAssociatedFile().getParentFile(), filename));
    905905            }
    906             MainApplication.getLayerManager().addLayer(gpxLayer);
     906            MainApplication.getLayerManager().addLayer(gpxLayer, false);
    907907            if (Config.getPref().getBoolean("marker.makeautomarkers", true) && !gpxData.waypoints.isEmpty()) {
    908                 MainApplication.getLayerManager().addLayer(new MarkerLayer(gpxData, tr("Converted from: {0}", getName()), null, gpxLayer));
     908                MainApplication.getLayerManager().addLayer(
     909                        new MarkerLayer(gpxData, tr("Converted from: {0}", getName()), null, gpxLayer), false);
    909910            }
    910911            MainApplication.getLayerManager().removeLayer(OsmDataLayer.this);
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java

    r13130 r13855  
    169169        }
    170170        osmLayer.setUploadDiscouraged(true);
    171         MainApplication.getLayerManager().addLayer(osmLayer);
     171        MainApplication.getLayerManager().addLayer(osmLayer, false);
    172172        MainApplication.getLayerManager().removeLayer(layer);
    173173    }
Note: See TracChangeset for help on using the changeset viewer.