Changeset 12541 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-07-30T06:29:03+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r12279 r12541 993 993 drawImageInside(g, img, anchorImage, anchorScreen, null); 994 994 } 995 if (tile instanceof ReprojectionTile ) {995 if (tile instanceof ReprojectionTile && ((ReprojectionTile) tile).needsUpdate(Main.map.mapView.getScale())) { 996 996 // This means we have a reprojected tile in memory cache, but not at 997 997 // current scale. Generally, the positioning of the tile will still … … 999 999 // reprojected to the target scale. The original tile image should 1000 1000 // still be in disk cache, so this is fairly cheap. 1001 if (((ReprojectionTile) tile).needsUpdate(Main.map.mapView.getScale())) { 1002 ((ReprojectionTile) tile).invalidate(); 1003 loadTile(tile, false); 1004 } 1001 ((ReprojectionTile) tile).invalidate(); 1002 loadTile(tile, false); 1005 1003 } 1006 1004 -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r11779 r12541 265 265 @Override 266 266 public void visit(Way w) { 267 if (e.child == null && left.matches(new Environment(w).withParent(e.osm)) ) {268 if (e.osm instanceof Way && Geometry.PolygonIntersection.CROSSING.equals(267 if (e.child == null && left.matches(new Environment(w).withParent(e.osm)) 268 && e.osm instanceof Way && Geometry.PolygonIntersection.CROSSING.equals( 269 269 Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))) { 270 e.child = w; 271 } 270 e.child = w; 272 271 } 273 272 } … … 282 281 @Override 283 282 public void visit(Node n) { 284 if (e.child == null && left.matches(new Environment(n).withParent(e.osm)) ) {285 if ((e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes()))283 if (e.child == null && left.matches(new Environment(n).withParent(e.osm)) 284 && (e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes())) 286 285 || (e.osm instanceof Relation && ( 287 286 (Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null))) { 288 e.child = n; 289 } 287 e.child = n; 290 288 } 291 289 } … … 293 291 @Override 294 292 public void visit(Way w) { 295 if (e.child == null && left.matches(new Environment(w).withParent(e.osm)) ) {296 if ((e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals(293 if (e.child == null && left.matches(new Environment(w).withParent(e.osm)) 294 && (e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals( 297 295 Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))) 298 296 || (e.osm instanceof Relation && ( 299 297 (Relation) e.osm).isMultipolygon() 300 298 && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null))) { 301 e.child = w; 302 } 299 e.child = w; 303 300 } 304 301 } … … 400 397 for (int i = 0; i < wayNodes.size(); i++) { 401 398 Node n = wayNodes.get(i); 402 if (left.matches(e.withPrimitive(n))) { 403 if (link.matches(e.withChildAndIndexAndLinkContext(n, i, wayNodes.size()))) { 404 e.child = n; 405 e.index = i; 406 e.count = wayNodes.size(); 407 return true; 408 } 399 if (left.matches(e.withPrimitive(n)) 400 && link.matches(e.withChildAndIndexAndLinkContext(n, i, wayNodes.size()))) { 401 e.child = n; 402 e.index = i; 403 e.count = wayNodes.size(); 404 return true; 409 405 } 410 406 } … … 413 409 for (int i = 0; i < members.size(); i++) { 414 410 OsmPrimitive member = members.get(i).getMember(); 415 if (left.matches(e.withPrimitive(member))) { 416 if (link.matches(e.withChildAndIndexAndLinkContext(member, i, members.size()))) { 417 e.child = member; 418 e.index = i; 419 e.count = members.size(); 420 return true; 421 } 411 if (left.matches(e.withPrimitive(member)) 412 && link.matches(e.withChildAndIndexAndLinkContext(member, i, members.size()))) { 413 e.child = member; 414 e.index = i; 415 e.count = members.size(); 416 return true; 422 417 } 423 418 }
Note:
See TracChangeset
for help on using the changeset viewer.