Changeset 354 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2007-10-09T12:40:44+02:00 (17 years ago)
Author:
gebner
Message:

Fix NameVisitor for circular ways, it counted a node occuring twice as 2 nodes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/NameVisitor.java

    r343 r354  
    6262                if (name == null) {
    6363                        String what = (w.get("highway") != null) ? "highway " : (w.get("railway") != null) ? "railway " : (w.get("waterway") != null) ? "waterway " : "";
    64                         name = what + trn("{0} node", "{0} nodes", w.nodes.size(), w.nodes.size());
     64                        int nodesNo = new HashSet(w.nodes).size();
     65                        name = what + trn("{0} node", "{0} nodes", nodesNo, nodesNo);
    6566                }
    6667                addId(w);
Note: See TracChangeset for help on using the changeset viewer.