Changeset 33506 in osm for applications/editors


Ignore:
Timestamp:
2017-08-17T15:51:30+02:00 (7 years ago)
Author:
giackserva
Message:

[pt_assistant] stop sorter also clears other members role

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/actions/SortPTStopsAction.java

    r33500 r33506  
    9191
    9292    public void sortPTStops(Relation rel) {
    93         List<RelationMember> members = rel.getMembers();
    94         for (int i = 0; i < members.size(); i++) {
     93        List<RelationMember> members = new ArrayList<>();
     94        List<RelationMember> oldMembers = rel.getMembers();
     95        for (int i = 0; i < oldMembers.size(); i++) {
     96            RelationMember rm = oldMembers.get(i);
     97            if (!PTStop.isPTPlatform(rm) && !PTStop.isPTStopPosition(rm))
     98                members.add(new RelationMember("", rm.getMember()));
     99            else
     100                members.add(rm);
    95101            rel.removeMember(0);
    96102        }
Note: See TracChangeset for help on using the changeset viewer.