Changeset 10775 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r10662 r10775 364 364 if (selectedNodes.size() == 1) { 365 365 Node n = selectedNodes.get(0); 366 List<Way> refer edWays =366 List<Way> referredWays = 367 367 OsmPrimitive.getFilteredList(n.getReferrers(), Way.class); 368 368 Way inTheMiddle = null; 369 for (Way w: refer edWays) {369 for (Way w: referredWays) { 370 370 // Need to look at all nodes see #11184 for a case where node n is 371 371 // firstNode, lastNode and also in the middle -
trunk/src/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTransferData.java
r10606 r10775 36 36 private static final class GetReferences implements ReferenceGetter { 37 37 @Override 38 public Collection<? extends OsmPrimitive> getRefer edPrimitives(OsmPrimitive primitive) {38 public Collection<? extends OsmPrimitive> getReferredPrimitives(OsmPrimitive primitive) { 39 39 if (primitive instanceof Way) { 40 40 return ((Way) primitive).getNodes(); … … 49 49 @FunctionalInterface 50 50 private interface ReferenceGetter { 51 Collection<? extends OsmPrimitive> getRefer edPrimitives(OsmPrimitive primitive);51 Collection<? extends OsmPrimitive> getReferredPrimitives(OsmPrimitive primitive); 52 52 } 53 53 … … 70 70 for (OsmPrimitive p : visited) { 71 71 direct.add(p.save()); 72 toCheck.addAll(referencedGetter.getRefer edPrimitives(p));72 toCheck.addAll(referencedGetter.getReferredPrimitives(p)); 73 73 } 74 74 while (!toCheck.isEmpty()) { … … 76 76 if (visited.add(p)) { 77 77 referenced.add(p.save()); 78 toCheck.addAll(referencedGetter.getRefer edPrimitives(p));78 toCheck.addAll(referencedGetter.getReferredPrimitives(p)); 79 79 } 80 80 } -
trunk/test/unit/org/openstreetmap/josm/command/DeleteCommandTest.java
r10758 r10775 67 67 68 68 /** 69 * A delete should not delete refer ed objects but should should remove the reference.69 * A delete should not delete referred objects but should should remove the reference. 70 70 */ 71 71 @Test … … 101 101 */ 102 102 @Test 103 public void testRefer edDelete() {103 public void testReferredDelete() { 104 104 DeleteCommand.deleteWithReferences(testData.layer, Arrays.asList(testData.existingNode), true).executeCommand(); 105 105
Note:
See TracChangeset
for help on using the changeset viewer.