Ignore:
Timestamp:
2009-12-11T22:39:45+01:00 (10 years ago)
Author:
mjulius
Message:

fixes #4104 - reversing of way does not update direction dependent roles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java

    r2573 r2611  
    1212import java.util.regex.Pattern;
    1313
    14 import org.openstreetmap.josm.Main;
    1514import org.openstreetmap.josm.command.Command;
    1615import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    142141        roleCorrectionMap.put(way, new ArrayList<RoleCorrection>());
    143142
    144         for (Relation relation : Main.main.getCurrentDataSet().getRelations()) {
     143        Collection<OsmPrimitive> referrers = oldway.getReferrers();
     144        for (OsmPrimitive referrer: referrers) {
     145            if (! (referrer instanceof Relation)) {
     146                continue;
     147            }
     148            Relation relation = (Relation)referrer;
    145149            int position = 0;
    146150            for (RelationMember member : relation.getMembers()) {
Note: See TracChangeset for help on using the changeset viewer.