Changeset 8180 in josm


Ignore:
Timestamp:
2015-04-09T21:25:17+02:00 (5 years ago)
Author:
stoecker
Message:

fix #10977 - reverse way handling of left/right together with oneway

Location:
trunk
Files:
2 edited

Legend:

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

    r7005 r8180  
    123123                    newValue = OsmUtils.reverseval;
    124124                }
     125                for (StringSwitcher prefixSuffixSwitcher : stringSwitchers) {
     126                    newKey = prefixSuffixSwitcher.apply(key);
     127                    if (!key.equals(newKey)) {
     128                        break;
     129                    }
     130                }
    125131            } else if (key.startsWith("incline") || key.endsWith("incline")
    126132                    || key.startsWith("direction") || key.endsWith("direction")) {
     
    132138                // Change key but not left/right value (fix #8518)
    133139                newKey = FORWARD_BACKWARD.apply(key);
    134 
    135140            } else if (!ignoreKeyForCorrection(key)) {
    136141                for (StringSwitcher prefixSuffixSwitcher : stringSwitchers) {
  • trunk/test/unit/org/openstreetmap/josm/corrector/ReverseWayTagCorrectorTest.java

    r7937 r8180  
    3838            assertSwitch(new Tag(k, "something"), new Tag(k, "something"));
    3939        }
     40        // :left/:right with oneway (see #10977)
     41        assertSwitch(new Tag("cycleway:left:oneway", "-1"), new Tag("cycleway:right:oneway", "yes"));
    4042        // :forward/:backward (see #8518)
    4143        assertSwitch(new Tag("turn:forward", "right"), new Tag("turn:backward", "right"));
Note: See TracChangeset for help on using the changeset viewer.