Changeset 3221 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2010-05-08T17:20:06+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r3083 r3221 871 871 private HistoryOsmPrimitive clone; 872 872 873 private String getUserName(OsmPrimitive primitive) { 874 return primitive.getUser() == null?null:primitive.getUser().getName(); 875 } 876 877 private long getUserId(OsmPrimitive primitive) { 878 return primitive.getUser() == null?0:primitive.getUser().getId(); 879 } 880 873 881 public void visit(Node n) { 874 clone = new HistoryNode(n.getId(), n.getVersion(), n.isVisible(), n.getUser().getName(), n.getUser().getId(), 0, n.getTimestamp(), n.getCoor());882 clone = new HistoryNode(n.getId(), n.getVersion(), n.isVisible(), getUserName(n), getUserId(n), 0, n.getTimestamp(), n.getCoor()); 875 883 clone.setTags(n.getKeys()); 876 884 } 877 885 878 886 public void visit(Relation r) { 879 clone = new HistoryRelation(r.getId(), r.getVersion(), r.isVisible(), r.getUser().getName(), r.getUser().getId(), 0, r.getTimestamp());887 clone = new HistoryRelation(r.getId(), r.getVersion(), r.isVisible(), getUserName(r), getUserId(r), 0, r.getTimestamp()); 880 888 clone.setTags(r.getKeys()); 881 889 HistoryRelation hr = (HistoryRelation)clone; … … 886 894 887 895 public void visit(Way w) { 888 clone = new HistoryWay(w.getId(), w.getVersion(), w.isVisible(), w.getUser().getName(), w.getUser().getId(), 0, w.getTimestamp());896 clone = new HistoryWay(w.getId(), w.getVersion(), w.isVisible(), getUserName(w), getUserId(w), 0, w.getTimestamp()); 889 897 clone.setTags(w.getKeys()); 890 898 for (Node n: w.getNodes()) {
Note:
See TracChangeset
for help on using the changeset viewer.