Ticket #2172: reversemember.patch
File reversemember.patch, 2.8 KB (added by , 16 years ago) |
---|
-
src/org/openstreetmap/josm/actions/ReverseWayAction.java
66 66 if (Main.pref.getBoolean("tag-correction.reverse-way", true)) { 67 67 try 68 68 { 69 final Collection<Command> changePropertyCommands = reverseWayTagCorrector.execute(w new);69 final Collection<Command> changePropertyCommands = reverseWayTagCorrector.execute(w, wnew); 70 70 propertiesUpdated = propertiesUpdated 71 71 || (changePropertyCommands != null && !changePropertyCommands.isEmpty()); 72 72 c.addAll(changePropertyCommands); -
src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
34 34 this.a = a; 35 35 this.b = b; 36 36 startPattern = Pattern.compile( 37 "^(" + a + "|" + b + ") " + SEPARATOR,37 "^(" + a + "|" + b + ")(" + SEPARATOR + "|$)", 38 38 Pattern.CASE_INSENSITIVE); 39 39 endPattern = Pattern.compile( 40 40 SEPARATOR + "(" + a + "|" + b + ")$", … … 67 67 }; 68 68 69 69 @Override 70 public Collection<Command> execute(Way way) throws UserCancelException {70 public Collection<Command> execute(Way oldway, Way way) throws UserCancelException { 71 71 Map<OsmPrimitive, List<TagCorrection>> tagCorrectionsMap = 72 72 new HashMap<OsmPrimitive, List<TagCorrection>>(); 73 73 … … 112 112 113 113 for (Relation relation : Main.ds.relations) { 114 114 for (RelationMember member : relation.members) { 115 if (!member.member.realEqual( way, true)115 if (!member.member.realEqual(oldway, true) 116 116 || member.role.length() == 0) 117 117 continue; 118 118 -
src/org/openstreetmap/josm/corrector/TagCorrector.java
32 32 33 33 public abstract class TagCorrector<P extends OsmPrimitive> { 34 34 35 public abstract Collection<Command> execute(P primitive )35 public abstract Collection<Command> execute(P primitive, P oldprimitive) 36 36 throws UserCancelException; 37 37 38 38 private String[] applicationOptions = new String[] {