Changeset 9968 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-03-12T19:18:29+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r9067 r9968 198 198 Arrays.sort(angles, new PolarNodeComparator()); 199 199 int[] count = distributeNodes(angles, 200 numberOfNodesInCircle >= nodes.size() ? numberOfNodesInCircle - nodes.size() : 0); 200 numberOfNodesInCircle >= nodes.size() ? (numberOfNodesInCircle - nodes.size()) : 0); 201 201 202 202 // now we can start doing things to OSM data -
trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
r9547 r9968 319 319 defaultExtension, 320 320 description + (!extensionsForDescription.isEmpty() 321 ? " (" + Utils.join(", ", extensionsForDescription) + ")" 321 ? (" (" + Utils.join(", ", extensionsForDescription) + ")") 322 322 : "") 323 323 ); -
trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
r9230 r9968 76 76 protected boolean isHeterogeneousSource() { 77 77 int count = 0; 78 count = !getSourcePrimitivesByType(OsmPrimitiveType.NODE).isEmpty() ? count + 1 : count; 79 count = !getSourcePrimitivesByType(OsmPrimitiveType.WAY).isEmpty() ? count + 1 : count; 80 count = !getSourcePrimitivesByType(OsmPrimitiveType.RELATION).isEmpty() ? count + 1 : count; 78 count = !getSourcePrimitivesByType(OsmPrimitiveType.NODE).isEmpty() ? (count + 1) : count; 79 count = !getSourcePrimitivesByType(OsmPrimitiveType.WAY).isEmpty() ? (count + 1) : count; 80 count = !getSourcePrimitivesByType(OsmPrimitiveType.RELATION).isEmpty() ? (count + 1) : count; 81 81 return count > 1; 82 82 } -
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r9872 r9968 614 614 String role = rm.getRole(); 615 615 if ("from".equals(role) || "to".equals(role)) { 616 OsmPrimitive via = null; 617 for (RelationMember rmv : r.getMembers()) { 618 if ("restriction".equals(type) && "via".equals(rmv.getRole()) 619 || "destination_sign".equals(type) && rmv.hasRole("sign", "intersection")) { 620 via = rmv.getMember(); 621 } 622 } 616 OsmPrimitive via = findVia(r, type); 623 617 List<Node> nodes = new ArrayList<>(); 624 618 if (via != null) { … … 751 745 } 752 746 747 static OsmPrimitive findVia(Relation r, String type) { 748 for (RelationMember rmv : r.getMembers()) { 749 if (("restriction".equals(type) && "via".equals(rmv.getRole())) 750 || ("destination_sign".equals(type) && rmv.hasRole("sign", "intersection"))) { 751 return rmv.getMember(); 752 } 753 } 754 return null; 755 } 756 753 757 /** 754 758 * Splits the way {@code way} at the nodes in {@code atNodes} and replies -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r9572 r9968 535 535 // existing way or make a new way of its own? The "alt" modifier means that the 536 536 // user wants a new way. 537 Way way = alt ? null : (selectedWay != null )? selectedWay : getWayForNode(n0);537 Way way = alt ? null : (selectedWay != null ? selectedWay : getWayForNode(n0)); 538 538 Way wayToSelect; 539 539 … … 1565 1565 e0 = p0.east(); 1566 1566 n0 = p0.north(); 1567 buildLabelText((nearestAngle <= 180) ? nearestAngle : nearestAngle-360); 1567 buildLabelText((nearestAngle <= 180) ? nearestAngle : (nearestAngle-360)); 1568 1568 1569 1569 phi = (nearestAngle + activeBaseHeading) * Math.PI / 180;
Note:
See TracChangeset
for help on using the changeset viewer.