Changeset 11852 in josm
- Timestamp:
- 2017-04-08T01:08:59+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r11746 r11852 75 75 } 76 76 77 p ublicstatic volatile ValidatorLayer errorLayer;77 private static volatile ValidatorLayer errorLayer; 78 78 79 79 /** The validate action */ … … 81 81 82 82 /** Grid detail, multiplier of east,north values for valuable cell sizing */ 83 p ublicstatic double griddetail;83 private static double griddetail; 84 84 85 85 private static final Collection<String> ignoredErrors = new TreeSet<>(); … … 215 215 } 216 216 217 /** 218 * Initializes error layer. 219 */ 217 220 public static synchronized void initializeErrorLayer() { 218 221 if (!ValidatorPreference.PREF_LAYER.get()) … … 222 225 Main.getLayerManager().addLayer(errorLayer); 223 226 } 227 } 228 229 /** 230 * Resets error layer. 231 * @since 11852 232 */ 233 public static synchronized void resetErrorLayer() { 234 errorLayer = null; 224 235 } 225 236 … … 303 314 OsmValidator.griddetail = 1.0; 304 315 } 316 } 317 318 /** 319 * Returns grid detail, multiplier of east,north values for valuable cell sizing 320 * @return grid detail 321 * @since 11852 322 */ 323 public static double getGridDetail() { 324 return griddetail; 305 325 } 306 326 -
trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
r11608 r11852 323 323 324 324 List<List<WaySegment>> cells = new ArrayList<>(); 325 for (Point2D cell : ValUtil.getSegmentCells(n1, n2, OsmValidator.g riddetail)) {325 for (Point2D cell : ValUtil.getSegmentCells(n1, n2, OsmValidator.getGridDetail())) { 326 326 List<WaySegment> segments = cellSegments.get(cell); 327 327 if (segments == null) { -
trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java
r10378 r11852 43 43 Set<Point2D> cellNodes = new HashSet<>(); 44 44 Point2D cell; 45 double griddetail = OsmValidator.getGridDetail(); 45 46 46 47 // First, round coordinates 47 48 // CHECKSTYLE.OFF: SingleSpaceSeparator 48 long x0 = Math.round(n1.getEastNorth().east() * OsmValidator.griddetail);49 long y0 = Math.round(n1.getEastNorth().north() * OsmValidator.griddetail);50 long x1 = Math.round(n2.getEastNorth().east() * OsmValidator.griddetail);51 long y1 = Math.round(n2.getEastNorth().north() * OsmValidator.griddetail);49 long x0 = Math.round(n1.getEastNorth().east() * griddetail); 50 long y0 = Math.round(n1.getEastNorth().north() * griddetail); 51 long x1 = Math.round(n2.getEastNorth().east() * griddetail); 52 long y1 = Math.round(n2.getEastNorth().north() * griddetail); 52 53 // CHECKSTYLE.ON: SingleSpaceSeparator 53 54 … … 76 77 // Then floor coordinates, in case the way is in the border of the cell. 77 78 // CHECKSTYLE.OFF: SingleSpaceSeparator 78 x0 = (long) Math.floor(n1.getEastNorth().east() * OsmValidator.griddetail);79 y0 = (long) Math.floor(n1.getEastNorth().north() * OsmValidator.griddetail);80 x1 = (long) Math.floor(n2.getEastNorth().east() * OsmValidator.griddetail);81 y1 = (long) Math.floor(n2.getEastNorth().north() * OsmValidator.griddetail);79 x0 = (long) Math.floor(n1.getEastNorth().east() * griddetail); 80 y0 = (long) Math.floor(n1.getEastNorth().north() * griddetail); 81 x1 = (long) Math.floor(n2.getEastNorth().east() * griddetail); 82 y1 = (long) Math.floor(n2.getEastNorth().north() * griddetail); 82 83 // CHECKSTYLE.ON: SingleSpaceSeparator 83 84 -
trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java
r10880 r11852 162 162 e.scheduleRemoval(Collections.singleton(this)); 163 163 } else if (e.getRemovedLayer() == this) { 164 OsmValidator. errorLayer = null;164 OsmValidator.resetErrorLayer(); 165 165 } 166 166 }
Note:
See TracChangeset
for help on using the changeset viewer.