Changeset 10678 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-07-30T13:01:26+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r10662 r10678 692 692 int posn0 = selectedWay.getNodes().indexOf(currentNode); 693 693 // CHECKSTYLE.OFF: SingleSpaceSeparator 694 if ( posn0 != -1 && // n0 is part of way695 (posn0 >= 1 && targetNode.equals(selectedWay.getNode(posn0-1))) || // previous node696 (posn0 < selectedWay.getNodesCount()-1) && targetNode.equals(selectedWay.getNode(posn0+1))) { // next node694 if ((posn0 != -1 && // n0 is part of way 695 (posn0 >= 1 && targetNode.equals(selectedWay.getNode(posn0-1)))) || // previous node 696 (posn0 < selectedWay.getNodesCount()-1 && targetNode.equals(selectedWay.getNode(posn0+1)))) { // next node 697 697 getLayerManager().getEditDataSet().setSelected(targetNode); 698 698 lastUsedNode = targetNode; -
trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java
r10657 r10678 76 76 } 77 77 final String[] parts = key.replaceAll(":conditional", "").split(":"); 78 return parts.length == 3 && isRestrictionType(parts[0]) && isTransportationMode(parts[1]) && isDirection(parts[2]) 79 || parts.length == 1 && (isRestrictionType(parts[0]) || isTransportationMode(parts[0])) 80 || parts.length == 2 && ( 81 isRestrictionType(parts[0]) && (isTransportationMode(parts[1]) || isDirection(parts[1])) 82 || isTransportationMode(parts[0]) && isDirection(parts[1])); 78 return isKeyValid3Parts(parts) || isKeyValid1Part(parts) || isKeyValid2Parts(parts); 79 } 80 81 private static boolean isKeyValid3Parts(String[] parts) { 82 return parts.length == 3 && isRestrictionType(parts[0]) && isTransportationMode(parts[1]) && isDirection(parts[2]); 83 } 84 85 private static boolean isKeyValid2Parts(String[] parts) { 86 return parts.length == 2 && ((isRestrictionType(parts[0]) && (isTransportationMode(parts[1]) || isDirection(parts[1]))) 87 || (isTransportationMode(parts[0]) && isDirection(parts[1]))); 88 } 89 90 private static boolean isKeyValid1Part(String[] parts) { 91 return parts.length == 1 && (isRestrictionType(parts[0]) || isTransportationMode(parts[0])); 83 92 } 84 93
Note:
See TracChangeset
for help on using the changeset viewer.