Changeset 12314 in josm for trunk/src


Ignore:
Timestamp:
2017-06-04T20:52:03+02:00 (7 years ago)
Author:
michael2402
Message:

Use DataSet getSelectedWays/Nodes helper functions.

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

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

    r12279 r12314  
    209209        if (ds == null)
    210210            return;
    211         Collection<OsmPrimitive> selection = ds.getSelected();
    212         Set<Way> selectedWays = OsmPrimitive.getFilteredSet(selection, Way.class);
     211        Collection<Way> selectedWays = ds.getSelectedWays();
    213212        if (selectedWays.size() < 2) {
    214213            new Notification(
  • trunk/src/org/openstreetmap/josm/actions/CopyCoordinatesAction.java

    r12161 r12314  
    1414import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
    1515import org.openstreetmap.josm.tools.Shortcut;
    16 import org.openstreetmap.josm.tools.Utils;
    1716
    1817public class CopyCoordinatesAction extends JosmAction {
     
    5453            return Collections.emptyList();
    5554        } else {
    56             return Utils.filteredCollection(ds.getSelected(), Node.class);
     55            return ds.getSelectedNodes();
    5756        }
    5857    }
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r12313 r12314  
    882882        DataSet ds = getLayerManager().getEditDataSet();
    883883        final Collection<OsmPrimitive> elementsToTest = new HashSet<>(ds.getSelected());
    884         for (Way osm : Utils.filteredCollection(ds.getSelected(), Way.class)) {
     884        for (Way osm : ds.getSelectedWays()) {
    885885            elementsToTest.addAll(osm.getNodes());
    886886        }
Note: See TracChangeset for help on using the changeset viewer.