- Timestamp:
- 2019-05-15T22:28:07+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs/relation
- Files:
-
- 3 edited
-
MemberTableLinkedCellRenderer.java (modified) (3 diffs)
-
sort/WayConnectionType.java (modified) (3 diffs)
-
sort/WayConnectionTypeCalculator.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java
r12657 r15076 67 67 68 68 if (value.linkPrev) { 69 g.setColor(Color.black); 69 if (value.onewayFollowsPrevious) { 70 g.setColor(Color.black); 71 } else { 72 g.setColor(Color.lightGray); 73 } 70 74 if (value.isOnewayHead) { 71 75 g.fillRect(xoff - 1, 0, 3, 1); … … 93 97 94 98 if (value.linkNext) { 95 g.setColor(Color.black); 99 if (value.onewayFollowsNext) { 100 g.setColor(Color.black); 101 } else { 102 g.setColor(Color.lightGray); 103 } 96 104 if (value.isOnewayTail) { 97 105 g.fillRect(xoff - 1, ymax, 3, 1); … … 120 128 121 129 /* vertical lines */ 122 g.setColor(Color.black); 130 if (value.onewayFollowsNext && value.onewayFollowsPrevious) { 131 g.setColor(Color.black); 132 } else { 133 g.setColor(Color.lightGray); 134 } 123 135 if (value.isLoop) { 124 136 g.drawLine(xoff+xloop, y1, xoff+xloop, y2); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java
r14030 r15076 22 22 * and / or the last node of this way is connected to the next way. 23 23 * direction is BACKWARD if it is the other way around. 24 * direction has a ONEWAY value, if it is tagged as such and it is connected 25 * to the previous / next member. 26 * ONEWAY_FORWARD == the first node of the oneway is the last node of the previous way 27 * ONEWAY_BACKWARD == the last node of the oneway is the last node of the previous way 24 28 * direction has a ROUNDABOUT value, if it is tagged as such and it is somehow 25 29 * connected to the previous / next member. … … 44 48 public boolean isOnewayHead; 45 49 public boolean isOnewayTail; 50 51 /** False, if the way is oneway and it doesn't follow the flow of the previous member */ 52 public boolean onewayFollowsPrevious = true; 53 /** True, if the way is oneway and it doesn't follow the flow of the next member */ 54 public boolean onewayFollowsNext = true; 46 55 47 56 public WayConnectionType(boolean linkPrev, boolean linkNext, Direction direction) { … … 83 92 */ 84 93 public String getTooltip() { 94 boolean onewayGood = onewayFollowsPrevious && onewayFollowsNext; 85 95 if (!isValid()) 86 96 return ""; 87 else if (linkPrev && linkNext) 97 else if (linkPrev && linkNext && onewayGood) 88 98 return tr("way is connected"); 89 else if (linkPrev) 99 else if (linkPrev && linkNext && !onewayGood) 100 return tr("way is connected but has a wrong oneway direction"); 101 else if (linkPrev && onewayGood) 90 102 return tr("way is connected to previous relation member"); 91 else if (linkNext) 103 else if (linkPrev && !onewayGood) 104 return tr("way is connected to previous relation member but has a wrong oneway direction"); 105 else if (linkNext && onewayGood) 92 106 return tr("way is connected to next relation member"); 107 else if (linkNext && !onewayGood) 108 return tr("way is connected to next relation member but has a wrong oneway direction"); 93 109 else 94 110 return tr("way is not connected to previous or next relation member"); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
r14473 r15076 119 119 if (lastWct != null) { 120 120 lastWct.linkNext = wct.linkPrev; 121 } 122 123 if (lastWct != null && i > 0 && m.getMember() instanceof Way && members.get(i - 1).getMember() instanceof Way 124 && (m.getWay().isOneway() != 0 || members.get(i - 1).getWay().isOneway() != 0)) { 125 Way way = m.getWay(); 126 Way previousWay = members.get(i - 1).getWay(); 127 if (way.isOneway() != 0 && previousWay.isOneway() != 0 && 128 (way.firstNode(true) != previousWay.lastNode(true) && 129 way.lastNode(true) != previousWay.firstNode(true))) { 130 wct.onewayFollowsPrevious = false; 131 lastWct.onewayFollowsNext = false; 132 } else if (way.isOneway() != 0 && previousWay.isOneway() == 0 && 133 previousWay.isFirstLastNode(way.lastNode(true))) { 134 wct.onewayFollowsPrevious = false; 135 } 121 136 } 122 137 con.set(i, wct);
Note:
See TracChangeset
for help on using the changeset viewer.
