Changeset 24784 in osm for applications/editors/josm


Ignore:
Timestamp:
2010-12-17T15:22:07+01:00 (14 years ago)
Author:
petrdlouhy
Message:

Fix to Split area action

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java

    r23190 r24784  
    88import java.util.Collections;
    99import java.util.List;
     10import java.util.LinkedList;
    1011
    1112import javax.swing.JOptionPane;
     
    5455
    5556        Collection<Way> selectedWays = Main.main.getCurrentDataSet().getSelectedWays();
    56         Collection<Way> newSelection = Main.main.getCurrentDataSet().getSelectedWays();
     57        Collection<Way> newSelection = new LinkedList(Main.main.getCurrentDataSet().getSelectedWays());
    5758
    58         for (OsmPrimitive prim : selectedWays) {
    59             if (!((Way) prim).isClosed()) continue;
    60                 Way area = (Way) prim;
     59        for (Way area : selectedWays) {
     60            if (! area.isClosed()) continue;
    6161
    6262            for (OsmPrimitive prim2 : Main.main.getCurrentDataSet().allNonDeletedPrimitives()) {
    6363                if (!(prim2 instanceof Way)) continue;
    64                 if (prim2.equals(prim))      continue;
     64                if (prim2.equals(area))      continue;
    6565                Way border = (Way) prim2;
    6666                if (border.getNodes().size() == 0)   continue;
Note: See TracChangeset for help on using the changeset viewer.