Changeset 9970 in josm
- Timestamp:
- 2016-03-12T23:18:04+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r9473 r9970 175 175 } 176 176 if (targetNode == null) { 177 targetNode = (oldestNode != null ? oldestNode : lastNode);177 targetNode = oldestNode != null ? oldestNode : lastNode; 178 178 } 179 179 return targetNode; -
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r9470 r9970 697 697 for (OsmPrimitive ref : way.getReferrers()) { 698 698 if (ref instanceof Relation && ref.isUsable()) { 699 affectedRelations.add( (ref.getDisplayName(DefaultNameFormatter.getInstance())));699 affectedRelations.add(ref.getDisplayName(DefaultNameFormatter.getInstance())); 700 700 } 701 701 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/ModifiersSpec.java
r8870 r9970 25 25 char c = str.charAt(2); 26 26 // @formatter:off 27 alt = (a == '?' ? UNKNOWN : (a == 'A' ? ON : OFF));28 shift = (s == '?' ? UNKNOWN : (s == 'S' ? ON : OFF));29 ctrl = (c == '?' ? UNKNOWN : (c == 'C' ? ON : OFF));27 alt = a == '?' ? UNKNOWN : (a == 'A' ? ON : OFF); 28 shift = s == '?' ? UNKNOWN : (s == 'S' ? ON : OFF); 29 ctrl = c == '?' ? UNKNOWN : (c == 'C' ? ON : OFF); 30 30 // @formatter:on 31 31 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r9246 r9970 410 410 // We don't want to change to draw tool if the user tries to (de)select 411 411 // stuff but accidentally clicks in an empty area when selection is empty 412 cancelDrawMode = (shift || ctrl);412 cancelDrawMode = shift || ctrl; 413 413 didMouseDrag = false; 414 414 initialMoveThresholdExceeded = false; … … 1152 1152 } else { 1153 1153 // setup for iterating a sel group again or a new, different one.. 1154 nxt = (cycleList.contains(cycleStart)) ? cycleStart : first;1154 nxt = cycleList.contains(cycleStart) ? cycleStart : first; 1155 1155 cycleStart = nxt; 1156 1156 } -
trunk/src/org/openstreetmap/josm/data/imagery/CachedAttributionBingAerialTileSource.java
r9171 r9970 70 70 try { 71 71 String xml = attributionLoader.updateIfRequiredString(); 72 List<Attribution> ret = parseAttributionText(new InputSource(new StringReader( (xml))));72 List<Attribution> ret = parseAttributionText(new InputSource(new StringReader(xml))); 73 73 if (attributionDownloadedTask != null) { 74 74 GuiHelper.runInEDT(attributionDownloadedTask); -
trunk/src/org/openstreetmap/josm/data/oauth/SignpostAdapters.java
r9669 r9970 7 7 import java.util.Map; 8 8 9 import org.openstreetmap.josm.tools.HttpClient; 10 9 11 import oauth.signpost.AbstractOAuthConsumer; 10 12 import oauth.signpost.AbstractOAuthProvider; 11 12 import org.openstreetmap.josm.tools.HttpClient;13 13 14 14 /** … … 54 54 @Override 55 55 protected HttpRequest wrap(Object request) { 56 return new HttpRequest(( (HttpClient) request));56 return new HttpRequest((HttpClient) request); 57 57 } 58 58 } -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r9961 r9970 292 292 protected OsmPrimitive(long id, int version, boolean allowNegativeId) { 293 293 this(id, allowNegativeId); 294 this.version = (id > 0 ? version : 0);294 this.version = id > 0 ? version : 0; 295 295 setIncomplete(id > 0 && version == 0); 296 296 } -
trunk/src/org/openstreetmap/josm/data/projection/proj/AlbersEqualArea.java
r9558 r9970 110 110 double cosphi = Math.cos(phi1); 111 111 double n = sinphi; 112 boolean secant = (Math.abs(phi1 - phi2) >= EPSILON);112 boolean secant = Math.abs(phi1 - phi2) >= EPSILON; 113 113 double m1 = msfn(sinphi, cosphi); 114 114 double q1 = qsfn(sinphi); … … 206 206 if (e >= EPSILON) { 207 207 final double con = e * sinphi; 208 return (one_es * (sinphi / (1. - con*con) -209 (0.5/e) * Math.log((1.-con) / (1.+con))) );208 return one_es * (sinphi / (1. - con*con) - 209 (0.5/e) * Math.log((1.-con) / (1.+con))); 210 210 } else { 211 211 return sinphi + sinphi; -
trunk/src/org/openstreetmap/josm/data/projection/proj/LambertAzimuthalEqualArea.java
r9636 r9970 258 258 if (e >= EPSILON) { 259 259 final double con = e * sinphi; 260 return ( (1.0 - e2) * (sinphi / (1.0 - con*con) -261 (0.5 / e) * Math.log((1.0 - con) / (1.0 + con))) );260 return (1.0 - e2) * (sinphi / (1.0 - con*con) - 261 (0.5 / e) * Math.log((1.0 - con) / (1.0 + con))); 262 262 } else { 263 263 return sinphi + sinphi; -
trunk/src/org/openstreetmap/josm/data/projection/proj/ObliqueMercator.java
r9558 r9970 381 381 u = AB * x; 382 382 } else { 383 u = ArB * Math.atan2( (S * cosgamma0 + V * singamma0), temp);383 u = ArB * Math.atan2(S * cosgamma0 + V * singamma0, temp); 384 384 } 385 385 } else { … … 408 408 y = Math.pow(E / Math.sqrt((1. + Up) / (1. - Up)), 1.0 / B); //calculate t 409 409 y = cphi2(y); 410 x = -Math.atan2( (Sp * cosgamma0 - Vp * singamma0), Math.cos(BrA * u)) / B;410 x = -Math.atan2(Sp * cosgamma0 - Vp * singamma0, Math.cos(BrA * u)) / B; 411 411 } 412 412 return new double[] {y, x}; -
trunk/src/org/openstreetmap/josm/data/projection/proj/PolarStereographic.java
r9559 r9970 161 161 if (Math.abs(phi-phi0) < ITERATION_TOLERANCE) { 162 162 x = (Math.abs(rho) < EPSILON) ? 0.0 : Math.atan2(x, -y); 163 y = (southPole)? -phi : phi;163 y = southPole ? -phi : phi; 164 164 break; 165 165 } -
trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
r9558 r9970 137 137 138 138 /* NOTE: meridinal distance at latitudeOfOrigin is always 0 */ 139 y = (mlfn(y, sinphi, cosphi) - ml0 +139 y = mlfn(y, sinphi, cosphi) - ml0 + 140 140 sinphi * al * x * 141 141 FC2 * (1.0 + 142 142 FC4 * als * (5.0 - t + n*(9.0 + 4.0*n) + 143 143 FC6 * als * (61.0 + t * (t - 58.0) + n*(270.0 - 330.0*t) + 144 FC8 * als * (1385.0 + t * (t*(543.0 - t) - 3111.0))))) );144 FC8 * als * (1385.0 + t * (t*(543.0 - t) - 3111.0))))); 145 145 146 146 x = al*(FC1 + FC3 * als*(1.0 - t + n + -
trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
r8848 r9970 393 393 } 394 394 String value = mapNameToValue.get(entityContent); 395 entityValue = (value == null ? -1 : Integer.parseInt(value));395 entityValue = value == null ? -1 : Integer.parseInt(value); 396 396 } 397 397 } -
trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
r9918 r9970 230 230 231 231 if (msg instanceof String) { 232 msg = new JMultilineLabel(( (String) msg), true);232 msg = new JMultilineLabel((String) msg, true); 233 233 } 234 234 -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r9969 r9970 991 991 if (nextKeyIndex == rows[rows.length-1]) { 992 992 // no gap found, pick next or previous key in list 993 nextKeyIndex = (nextKeyIndex + 1 < rowCount ? nextKeyIndex + 1 : rows[0] - 1);993 nextKeyIndex = nextKeyIndex + 1 < rowCount ? nextKeyIndex + 1 : rows[0] - 1; 994 994 } else { 995 995 // gap found -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
r9246 r9970 77 77 if (!RelationSortUtils.isOneway(m) && lastWct != null) { 78 78 wct.direction = determineDirection(i-1, lastWct.direction, i); 79 wct.linkPrev = (wct.direction != NONE);79 wct.linkPrev = wct.direction != NONE; 80 80 } 81 81 } -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r9231 r9970 388 388 Rectangle splitChildBounds = splitChild.getBounds(); 389 389 double minSplitChildWidth = minimumNodeSize(splitChild).getWidth(); 390 double splitChildWeight = (onlyShrinkWeightedComponents)390 double splitChildWeight = onlyShrinkWeightedComponents 391 391 ? splitChild.getWeight() 392 392 : (splitChildBounds.getWidth() / totalWidth); … … 434 434 Rectangle splitChildBounds = splitChild.getBounds(); 435 435 double minSplitChildHeight = minimumNodeSize(splitChild).getHeight(); 436 double splitChildWeight = (onlyShrinkWeightedComponents)436 double splitChildWeight = onlyShrinkWeightedComponents 437 437 ? splitChild.getWeight() 438 438 : (splitChildBounds.getHeight() / totalHeight); … … 499 499 layout2(splitChild, newSplitChildBounds); 500 500 } else if ((availableWidth > 0.0) && (splitChildWeight > 0.0)) { 501 double allocatedWidth = (splitChild.equals(lastWeightedChild))501 double allocatedWidth = splitChild.equals(lastWeightedChild) 502 502 ? availableWidth 503 503 : Math.rint(splitChildWeight * extraWidth); … … 537 537 layout2(splitChild, newSplitChildBounds); 538 538 } else if ((availableHeight > 0.0) && (splitChildWeight > 0.0)) { 539 double allocatedHeight = (splitChild.equals(lastWeightedChild))539 double allocatedHeight = splitChild.equals(lastWeightedChild) 540 540 ? availableHeight 541 541 : Math.rint(splitChildWeight * extraHeight); … … 616 616 Node splitChild = splitChildren.next(); 617 617 Divider dividerChild = 618 (splitChildren.hasNext()) ? (Divider) (splitChildren.next()) : null;618 splitChildren.hasNext() ? (Divider) (splitChildren.next()) : null; 619 619 620 620 double childWidth = 0.0; … … 650 650 Node splitChild = splitChildren.next(); 651 651 Divider dividerChild = 652 (splitChildren.hasNext()) ? (Divider) (splitChildren.next()) : null;652 splitChildren.hasNext() ? (Divider) splitChildren.next() : null; 653 653 654 654 double childHeight = 0.0; … … 762 762 if (root instanceof Divider) { 763 763 Divider divider = (Divider) root; 764 return (divider.getBounds().contains(x, y)) ? divider : null;764 return divider.getBounds().contains(x, y) ? divider : null; 765 765 } else if (root instanceof Split) { 766 766 Split split = (Split) root; -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java
r8840 r9970 336 336 MultiSplitLayout.Divider divider = getMultiSplitLayout().dividerAt(x, y); 337 337 if (divider != null) { 338 cursorID = (divider.isVertical()) ?338 cursorID = divider.isVertical() ? 339 339 Cursor.E_RESIZE_CURSOR : 340 340 Cursor.N_RESIZE_CURSOR; -
trunk/src/org/openstreetmap/josm/io/OsmWriter.java
r9310 r9970 56 56 super(out); 57 57 this.osmConform = osmConform; 58 this.version = (version == null ? DEFAULT_API_VERSION : version);58 this.version = version == null ? DEFAULT_API_VERSION : version; 59 59 } 60 60 -
trunk/src/org/openstreetmap/josm/tools/ExifReader.java
r9697 r9970 190 190 throw new IllegalArgumentException("deg, min and sec are NaN"); 191 191 192 value = (Double.isNaN(deg) ? 0 : deg + (Double.isNaN(min) ? 0 : (min / 60)) + (Double.isNaN(sec) ? 0 : (sec / 3600)));192 value = Double.isNaN(deg) ? 0 : deg + (Double.isNaN(min) ? 0 : (min / 60)) + (Double.isNaN(sec) ? 0 : (sec / 3600)); 193 193 194 194 if (dirGps.getString(gpsTagRef).charAt(0) == cRef) {
Note:
See TracChangeset
for help on using the changeset viewer.