Changeset 1617 in josm
- Timestamp:
- 2009-05-24T12:21:41+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java
r1614 r1617 21 21 import org.openstreetmap.josm.Main; 22 22 import org.openstreetmap.josm.command.ChangeCommand; 23 import org.openstreetmap.josm.command.ChangeRelationMemberRoleCommand; 23 24 import org.openstreetmap.josm.command.Command; 24 25 import org.openstreetmap.josm.data.osm.Node; … … 168 169 List<RoleCorrection> roleCorrections = roleCorrectionMap 169 170 .get(primitive); 170 for (Relation relation : Main.ds.relations) {171 Relation newRelation = new Relation(relation);172 Boolean changed = false;173 171 174 for (int i = 0; i < roleCorrections.size(); i++) { 175 RoleCorrection roleCorrection = roleCorrections.get(i); 176 if (roleCorrection.relation == relation && 177 roleTableMap.get(primitive).getCorrectionTableModel().getApply(i)) { 178 179 RelationMember member = newRelation.members.get(roleCorrection.position); 180 181 if (member.equals(roleCorrection.member)) { 182 member.role = roleCorrection.newRole; 183 changed = true; 184 } 185 } 172 for (int i = 0; i < roleCorrections.size(); i++) { 173 RoleCorrection roleCorrection = roleCorrections.get(i); 174 if (roleTableMap.get(primitive).getCorrectionTableModel().getApply(i)) { 175 commands.add(new ChangeRelationMemberRoleCommand(roleCorrection.relation, roleCorrection.position, roleCorrection.newRole)); 186 176 } 187 if (changed)188 commands.add(new ChangeCommand(relation, newRelation));189 177 } 190 178 }
Note:
See TracChangeset
for help on using the changeset viewer.