Changeset 30133 in osm for applications


Ignore:
Timestamp:
2013-12-17T16:30:53+01:00 (11 years ago)
Author:
donvip
Message:

[josm_simplifyarea] code simplification

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaAction.java

    r29355 r30133  
    1414import java.util.HashMap;
    1515import java.util.HashSet;
    16 import java.util.LinkedList;
    1716import java.util.List;
    1817import java.util.Map;
     
    3130import org.openstreetmap.josm.data.Bounds;
    3231import org.openstreetmap.josm.data.coor.LatLon;
    33 import org.openstreetmap.josm.data.osm.DataSource;
    3432import org.openstreetmap.josm.data.osm.Node;
    3533import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    3735import org.openstreetmap.josm.gui.HelpAwareOptionPane;
    3836import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec;
    39 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    4037import org.openstreetmap.josm.tools.ImageProvider;
    4138import org.openstreetmap.josm.tools.Shortcut;
     
    5249
    5350
    54 
    5551    private List<Bounds> getCurrentEditBounds() {
    56         final LinkedList<Bounds> bounds = new LinkedList<Bounds>();
    57         final OsmDataLayer dataLayer = Main.map.mapView.getEditLayer();
    58         for (final DataSource ds : dataLayer.data.dataSources) {
    59             if (ds.bounds != null) {
    60                 bounds.add(ds.bounds);
    61             }
    62         }
    63         return bounds;
     52        return Main.map.mapView.getEditLayer().data.getDataSourceBounds();
    6453    }
    6554
Note: See TracChangeset for help on using the changeset viewer.