Changeset 10670 in josm
- Timestamp:
- 2016-07-29T00:02:17+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
r10528 r10670 242 242 List<WaySegment> highlight; 243 243 244 if ( errorSegments.contains(es1) && errorSegments.contains(es2)244 if ((errorSegments.contains(es1) && errorSegments.contains(es2)) 245 245 || !es1.intersects(es2) 246 246 || ignoreWaySegmentCombination(es1.way, es2.way)) { -
trunk/src/org/openstreetmap/josm/gui/MapMover.java
r10659 r10670 183 183 int offMask = MouseEvent.BUTTON1_DOWN_MASK | MouseEvent.BUTTON2_DOWN_MASK; 184 184 int macMouseMask = MouseEvent.CTRL_DOWN_MASK | MouseEvent.BUTTON1_DOWN_MASK; 185 if ( e.getButton() == MouseEvent.BUTTON3 && (e.getModifiersEx() & offMask) == 0||186 Main.isPlatformOsx() && e.getModifiersEx() == macMouseMask) {185 if ((e.getButton() == MouseEvent.BUTTON3 && (e.getModifiersEx() & offMask) == 0) || 186 (Main.isPlatformOsx() && e.getModifiersEx() == macMouseMask)) { 187 187 startMovement(e); 188 188 } -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java
r10611 r10670 91 91 @Override 92 92 public void processKeyEvent(KeyEvent e) { 93 int keyCode = e.getKeyCode(); 94 if (e.getID() == KeyEvent.KEY_PRESSED && keyCode == KeyEvent.VK_ENTER) { 95 fireGotoNextDecision(); 96 } else if (e.getID() == KeyEvent.KEY_PRESSED && keyCode == KeyEvent.VK_TAB) { 97 if (e.isShiftDown()) { 98 fireGotoPreviousDecision(); 99 } else { 93 if (e.getID() == KeyEvent.KEY_PRESSED) { 94 int keyCode = e.getKeyCode(); 95 if (keyCode == KeyEvent.VK_ENTER) { 100 96 fireGotoNextDecision(); 97 } else if (keyCode == KeyEvent.VK_TAB) { 98 if (e.isShiftDown()) { 99 fireGotoPreviousDecision(); 100 } else { 101 fireGotoNextDecision(); 102 } 103 } else if (keyCode == KeyEvent.VK_DELETE || keyCode == KeyEvent.VK_BACK_SPACE) { 104 if (editorModel.getIndexOf(MultiValueDecisionType.KEEP_NONE) > 0) { 105 editorModel.setSelectedItem(MultiValueDecisionType.KEEP_NONE); 106 fireGotoNextDecision(); 107 } 108 } else if (keyCode == KeyEvent.VK_ESCAPE) { 109 cancelCellEditing(); 101 110 } 102 } else if (e.getID() == KeyEvent.KEY_PRESSED && keyCode == KeyEvent.VK_DELETE || keyCode == KeyEvent.VK_BACK_SPACE) {103 if (editorModel.getIndexOf(MultiValueDecisionType.KEEP_NONE) > 0) {104 editorModel.setSelectedItem(MultiValueDecisionType.KEEP_NONE);105 fireGotoNextDecision();106 }107 } else if (e.getID() == KeyEvent.KEY_PRESSED && keyCode == KeyEvent.VK_ESCAPE) {108 cancelCellEditing();109 111 } 110 112 super.processKeyEvent(e); -
trunk/src/org/openstreetmap/josm/gui/history/TagTableCellRenderer.java
r10637 r10670 36 36 boolean isValue) { 37 37 Color bgColor = UIManager.getColor("Table.background"); 38 if ( !model.hasTag(key) && model.isCurrentPointInTime()39 || !model.oppositeHasTag(key) && model.isReferencePointInTime()) {38 if ((!model.hasTag(key) && model.isCurrentPointInTime()) 39 || (!model.oppositeHasTag(key) && model.isReferencePointInTime())) { 40 40 bgColor = TwoColumnDiff.Item.DiffItemType.DELETED.getColor(); 41 } else if ( !model.oppositeHasTag(key) && model.isCurrentPointInTime()42 || !model.hasTag(key) && model.isReferencePointInTime()) {41 } else if ((!model.oppositeHasTag(key) && model.isCurrentPointInTime()) 42 || (!model.hasTag(key) && model.isReferencePointInTime())) { 43 43 bgColor = TwoColumnDiff.Item.DiffItemType.INSERTED.getColor(); 44 44 } else if (isValue && model.hasTag(key) && model.oppositeHasTag(key) && !model.hasSameValueAsOpposite(key)) { -
trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java
r9246 r10670 79 79 Diff.Change scriptReversed = new Diff(referenceReversed, current).diff_2(false); 80 80 if (scriptReversed == null /* reference and current are identical */ 81 || script != null && scriptReversed.getTotalNumberOfChanges() < script.getTotalNumberOfChanges()) {81 || (script != null && scriptReversed.getTotalNumberOfChanges() < script.getTotalNumberOfChanges())) { 82 82 this.referenceReversed = true; 83 83 twoColumnDiffFromScript(scriptReversed, referenceReversed, current, true); -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r10657 r10670 884 884 } 885 885 final Way way = (Way) env.osm; 886 return way.isClosed() && Geometry.isClockwise(way)887 || !way.isClosed() && way.getNodesCount() > 2 && Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode());886 return (way.isClosed() && Geometry.isClockwise(way)) 887 || (!way.isClosed() && way.getNodesCount() > 2 && Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode())); 888 888 } 889 889 … … 900 900 } 901 901 final Way way = (Way) env.osm; 902 return way.isClosed() && !Geometry.isClockwise(way)903 || !way.isClosed() && way.getNodesCount() > 2 && !Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode());902 return (way.isClosed() && !Geometry.isClockwise(way)) 903 || (!way.isClosed() && way.getNodesCount() > 2 && !Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode())); 904 904 } 905 905 -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r10659 r10670 277 277 public void visit(Node n) { 278 278 if (e.child == null && left.matches(new Environment(n).withParent(e.osm))) { 279 if ( e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes())280 || e.osm instanceof Relation && (281 (Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null)) {279 if ((e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes())) 280 || (e.osm instanceof Relation && ( 281 (Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null))) { 282 282 e.child = n; 283 283 } … … 288 288 public void visit(Way w) { 289 289 if (e.child == null && left.matches(new Environment(w).withParent(e.osm))) { 290 if ( e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals(291 Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes())) 292 || e.osm instanceof Relation && (290 if ((e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals( 291 Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))) 292 || (e.osm instanceof Relation && ( 293 293 (Relation) e.osm).isMultipolygon() 294 && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null)) {294 && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null))) { 295 295 e.child = w; 296 296 } -
trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/MultiSelect.java
r9665 r10670 34 34 originalValue = usage.getFirst(); 35 35 list.setSelectedItem(originalValue); 36 } else if ( def != null && !usage.hadKeys() || PROP_FILL_DEFAULT.get() || "force".equals(use_last_as_default)) {36 } else if ((def != null && !usage.hadKeys()) || PROP_FILL_DEFAULT.get() || "force".equals(use_last_as_default)) { 37 37 originalValue = DIFFERENT; 38 38 list.setSelectedItem(def); -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r10638 r10670 269 269 return ImageIO.getImageReadersByMIMEType(format).hasNext() 270 270 // handles image/tiff image/tiff8 image/geotiff image/geotiff8 271 || ( format.startsWith("image/tiff") || format.startsWith("image/geotiff"))272 && ImageIO.getImageReadersBySuffix("tiff").hasNext() 273 || format.startsWith("image/png") && ImageIO.getImageReadersBySuffix("png").hasNext()274 || format.startsWith("image/svg") && ImageIO.getImageReadersBySuffix("svg").hasNext()275 || format.startsWith("image/bmp") && ImageIO.getImageReadersBySuffix("bmp").hasNext();271 || ((format.startsWith("image/tiff") || format.startsWith("image/geotiff")) 272 && ImageIO.getImageReadersBySuffix("tiff").hasNext()) 273 || (format.startsWith("image/png") && ImageIO.getImageReadersBySuffix("png").hasNext()) 274 || (format.startsWith("image/svg") && ImageIO.getImageReadersBySuffix("svg").hasNext()) 275 || (format.startsWith("image/bmp") && ImageIO.getImageReadersBySuffix("bmp").hasNext()); 276 276 } 277 277
Note:
See TracChangeset
for help on using the changeset viewer.