Changeset 2589 in josm


Ignore:
Timestamp:
2009-12-06T15:20:08+01:00 (15 years ago)
Author:
stoecker
Message:

small code cleanup

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

Legend:

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

    r2578 r2589  
    459459        ArrayList<RelationRole> result = new ArrayList<RelationRole>();
    460460        for (Relation r : Main.main.getCurrentDataSet().getRelations()) {
    461             if (r.isDeleted() || r.isIncomplete()) {
     461            if (r.isDeleted())
    462462                continue;
    463             }
    464463            for (RelationMember rm : r.getMembers()) {
    465464                if (rm.getMember() != osm) {
  • trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java

    r2578 r2589  
    9090                int count = 0;
    9191                for (Way w : OsmPrimitive.getFilteredList(n.getReferrers(), Way.class)) {
    92                     if (w.isDeleted() || w.isIncomplete()) {
     92                    if (!w.isUsable())
    9393                        continue;
    94                     }
    9594                    count++;
    9695                }
     
    308307        HashSet<String> rolesToReAdd = null;
    309308        for (Relation r : OsmPrimitive.getFilteredList(originalNode.getReferrers(), Relation.class)) {
    310             if (r.isDeleted() || r.isIncomplete()) {
     309            if (r.isDeleted())
    311310                continue;
    312             }
    313311            newRel = null;
    314312            rolesToReAdd = null;
  • trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java

    r2587 r2589  
    145145        if (myWay == null)
    146146            throw new RuntimeException(tr("Missing merge target for way with id {0}", other.getUniqueId()));
    147         if (!myWay.isIncomplete())return;
    148         if (myWay.isIncomplete() && other.getNodesCount() == 0) return;
     147        if (!myWay.isIncomplete() || other.getNodesCount() == 0) return;
    149148        for (Node n: myWay.getNodes()) {
    150149            if (n.isIncomplete()) return;
     
    154153
    155154    /**
    156      * A way in the target dataset might be incomplete because at least of of its nodes is incomplete.
    157      * The nodes might have become complete because a complete node was merged onto into in the
     155     * A way in the target dataset might be incomplete because at least one of its nodes is incomplete.
     156     * The nodes might have become complete because a complete node was merged into in the
    158157     * merge operation.
    159      * 
     158     *
    160159     * This method loops over all parent ways of such nodes and turns them into complete ways
    161160     * if necessary.
    162      * 
     161     *
    163162     * @param other
    164163     */
Note: See TracChangeset for help on using the changeset viewer.