Changeset 3789 in josm
- Timestamp:
- 2011-01-15T20:28:49+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
r3788 r3789 952 952 } 953 953 954 intfirstGroupIdx=0;954 firstGroupIdx=0; 955 955 956 956 lastForwardWay = UNCONNECTED; … … 984 984 wct.isOnewayHead = true; 985 985 lastForwardWay = i-1; 986 lastBackwardWay = i ;986 lastBackwardWay = i-1; 987 987 onewayBeginning = true; 988 988 } … … 1017 1017 1018 1018 if(!wct.linkPrev) { 1019 if(i > 0) makeLoopIfNeeded(con, i-1 , firstGroupIdx);1019 if(i > 0) makeLoopIfNeeded(con, i-1); 1020 1020 firstGroupIdx = i; 1021 1021 } 1022 1022 } 1023 makeLoopIfNeeded(con, members.size()-1 , firstGroupIdx);1023 makeLoopIfNeeded(con, members.size()-1); 1024 1024 connectionType = con; 1025 1025 // for (int i=0; i<con.size(); ++i) { … … 1056 1056 } 1057 1057 1058 private void makeLoopIfNeeded(final List<WayConnectionType> con, final int i, final int firstGroupIdx) { 1058 int firstGroupIdx; 1059 private void makeLoopIfNeeded(final List<WayConnectionType> con, final int i) { 1059 1060 boolean loop; 1060 1061 if (i == firstGroupIdx) { //is primitive loop … … 1092 1093 Direction dirBW = NONE; 1093 1094 if(onewayBeginning) { 1094 if(lastBackwardWay != i) 1095 dirBW = determineDirection(lastBackwardWay, reverse(con.get(lastBackwardWay).direction), i, true); 1095 if(lastBackwardWay < 0) 1096 dirBW = determineDirection(firstGroupIdx, reverse(con.get(firstGroupIdx).direction), i, true); 1097 else 1098 dirBW = determineDirection(lastBackwardWay, con.get(lastBackwardWay).direction, i, true); 1099 1096 1100 if(dirBW != NONE) 1097 1101 onewayBeginning = false; … … 1117 1121 wct.isOnewayHead = true; 1118 1122 lastForwardWay = i-1; 1119 lastBackwardWay = i ;1123 lastBackwardWay = i-1; 1120 1124 } else { 1121 1125 lastForwardWay = UNCONNECTED;
Note:
See TracChangeset
for help on using the changeset viewer.