Changeset 261 in josm


Ignore:
Timestamp:
2007-06-20T23:29:26+02:00 (17 years ago)
Author:
framm
Message:
  • ways without name but with "ref" are now listed with their ref value; ways without name and ref are listed as "highway x nodes", "railway x nodes", "waterway x nodes" or "x nodes" for other categories.
File:
1 edited

Legend:

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

    r214 r261  
    7474        /**
    7575         * If the way has a name-key or id-key, this is displayed. If not, (x nodes)
    76          * is displayed with x beeing the number of nodes in the way.
     76         * is displayed with x being the number of nodes in the way.
    7777         */
    7878        public void visit(Way w) {
    7979                name = w.get("name");
     80                if (name == null) name = w.get("ref");
    8081                if (name == null) {
    8182                        AllNodesVisitor.getAllNodes(w.segments);
     
    8788                                }
    8889                        }
    89                         name = trn("{0} node", "{0} nodes", nodes.size(), nodes.size());
     90                        String what = (w.get("highway") != null) ? "highway " : (w.get("railway") != null) ? "railway " : (w.get("waterway") != null) ? "waterway " : "";
     91                        name = what + trn("{0} node", "{0} nodes", nodes.size(), nodes.size());
    9092                }
    9193                if (w.isIncomplete())
Note: See TracChangeset for help on using the changeset viewer.