Changeset 23 in josm for src/org/openstreetmap/josm/command/AddCommand.java
- Timestamp:
- 2005-10-27T00:38:03+02:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/command/AddCommand.java
r22 r23 43 43 SelectionComponentVisitor v = new SelectionComponentVisitor(); 44 44 osm.visit(v); 45 return new JLabel(v.name, v.icon, JLabel.LEADING); 45 return new JLabel("Add "+v.name, v.icon, JLabel.LEADING); 46 46 } 47 47 48 48 public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) { 49 if (!added.contains(osm)) 49 if (added != null && !added.contains(osm)) 50 50 added.add(osm); 51 51 } … … 65 65 public void visit(LineSegment ls) { 66 66 Main.main.ds.pendingLineSegments.add(ls); 67 Main.main.ds.addBackReference(ls.start, ls); 68 Main.main.ds.addBackReference(ls.end, ls); 67 69 } 68 70 … … 74 76 Main.main.ds.tracks.add(t); 75 77 for (Iterator<LineSegment> it = Main.main.ds.pendingLineSegments.iterator(); it.hasNext();) 76 if (t.segments ().contains(it.next()))78 if (t.segments.contains(it.next())) 77 79 it.remove(); 80 for (LineSegment ls : t.segments) { 81 Main.main.ds.addBackReference(ls, t); 82 Main.main.ds.addBackReference(ls.start, t); 83 Main.main.ds.addBackReference(ls.end, t); 84 } 78 85 } 79 86
Note:
See TracChangeset
for help on using the changeset viewer.