Ticket #19432: 19432.patch

File 19432.patch, 2.2 KB (added by GerdP, 9 months ago)
  • src/org/openstreetmap/josm/command/SplitWayCommand.java

     
    360360            if (!relationAnalysis.needsMoreMembers()) continue;
    361361
    362362            Relation relation = relationAnalysis.getRelation();
    363             int position = relationAnalysis.getPosition();
     363            int position = relationAnalysis.getPositionInOrig();
    364364            int membersCount = relation.getMembersCount();
    365365
    366366            // Mark the neighbouring members for downloading if these are ways too.
     
    584584                                && relationMembers.size() > 1
    585585                                && r.hasIncompleteMembers();
    586586
    587                         relationAnalyses.add(new RelationAnalysis(c, rm, direction, needsMoreMembers, ic));
     587                        relationAnalyses.add(new RelationAnalysis(c, rm, direction, needsMoreMembers, ic, ir));
    588588                        ic += indexOfWayToKeep;
    589589                    }
    590590                }
     
    919919        private final Direction direction;
    920920        private final boolean needsMoreMembers;
    921921        private final int position;
     922        private final int positionInOrig;
    922923
    923924        RelationAnalysis(Relation relation,
    924925                                RelationMember relationMember,
    925926                                Direction direction,
    926927                                boolean needsMoreMembers,
    927                                 int position) {
     928                                int position,
     929                                int positionInOrig) {
    928930            this.relation = relation;
    929931            this.relationMember = relationMember;
    930932            this.direction = direction;
    931933            this.needsMoreMembers = needsMoreMembers;
    932934            this.position = position;
     935            this.positionInOrig = positionInOrig;
    933936        }
    934937
    935938        RelationMember getRelationMember() {
     
    951954        int getPosition() {
    952955            return position;
    953956        }
     957
     958        public int getPositionInOrig() {
     959            return positionInOrig;
     960        }
    954961    }
    955962
    956963    enum Direction {