Changeset 6069 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2013-07-17T00:01:07+02:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/command
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java
r5953 r6069 59 59 init(data, toSelect); 60 60 } 61 61 62 62 private final void init(List<PrimitiveData> data, List<PrimitiveData> toSelect) { 63 63 CheckParameterUtil.ensureParameterNotNull(data, "data"); … … 113 113 @Override public void undoCommand() { 114 114 DataSet ds = getLayer().data; 115 115 116 116 if (createdPrimitives == null) { 117 117 createdPrimitives = new ArrayList<OsmPrimitive>(data.size()); 118 118 createdPrimitivesToSelect = new ArrayList<OsmPrimitive>(toSelect.size()); 119 119 120 120 for (PrimitiveData pd : data) { 121 121 OsmPrimitive p = ds.getPrimitiveById(pd); … … 126 126 } 127 127 createdPrimitives = PurgeCommand.topoSort(createdPrimitives); 128 128 129 129 for (PrimitiveData p : data) { 130 130 ds.removePrimitive(p); … … 132 132 data = null; 133 133 toSelect = null; 134 134 135 135 } else { 136 136 for (OsmPrimitive osm : createdPrimitives) { … … 161 161 if (createdPrimitives != null) 162 162 return createdPrimitives; 163 163 164 164 Collection<OsmPrimitive> prims = new HashSet<OsmPrimitive>(); 165 165 for (PrimitiveData d : data) { -
trunk/src/org/openstreetmap/josm/command/MoveCommand.java
r5694 r6069 31 31 private Collection<Node> nodes = new LinkedList<Node>(); 32 32 /** 33 * Starting position, base command point, current (mouse-drag) position = startEN + (x,y) = 33 * Starting position, base command point, current (mouse-drag) position = startEN + (x,y) = 34 34 */ 35 35 private EastNorth startEN; … … 73 73 this(objects, offset.getX(), offset.getY()); 74 74 } 75 75 76 76 /** 77 77 * Create a MoveCommand and assign the initial object set and movement vector. … … 102 102 startEN = start; 103 103 } 104 104 105 105 /** 106 106 * Move the same set of objects again by the specified vector. The vectors … … 122 122 moveAgain(x - this.x, y - this.y); 123 123 } 124 125 /** 126 * Change the displacement vector to have endpoint @param currentEN 124 125 /** 126 * Change the displacement vector to have endpoint @param currentEN 127 127 * starting point is startEN 128 128 */ 129 129 public void applyVectorTo(EastNorth currentEN) { 130 if (startEN == null) 130 if (startEN == null) 131 131 return; 132 132 x = currentEN.getX() - startEN.getX(); -
trunk/src/org/openstreetmap/josm/command/PurgeCommand.java
r5993 r6069 39 39 40 40 protected Map<PrimitiveId, PrimitiveData> makeIncompleteData_byPrimId; 41 41 42 42 protected final ConflictCollection purgedConflicts = new ConflictCollection(); 43 43 … … 132 132 } 133 133 } 134 134 135 135 for (Conflict<?> conflict : purgedConflicts) { 136 136 getLayer().getConflicts().add(conflict); -
trunk/src/org/openstreetmap/josm/command/RotateCommand.java
r4918 r6069 61 61 handleEvent(currentEN); 62 62 } 63 63 64 64 /** 65 65 * Get angle between the horizontal axis and the line formed by the pivot and give points.
Note:
See TracChangeset
for help on using the changeset viewer.