- Timestamp:
- 2013-02-21T23:58:58+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
r5598 r5740 1082 1082 protected abstract Bounds getBounds(); 1083 1083 protected final boolean all; 1084 protected final Bounds bounds;1085 1084 1086 1085 /** … … 1089 1088 public InArea(boolean all) { 1090 1089 this.all = all; 1091 this.bounds = getBounds();1092 1090 } 1093 1091 … … 1096 1094 if (!osm.isUsable()) 1097 1095 return false; 1098 else if (osm instanceof Node) 1099 return bounds.contains(((Node) osm).getCoor()); 1100 else if (osm instanceof Way) { 1096 else if (osm instanceof Node) { 1097 Bounds bounds = getBounds(); 1098 return bounds != null && bounds.contains(((Node) osm).getCoor()); 1099 } else if (osm instanceof Way) { 1101 1100 Collection<Node> nodes = ((Way) osm).getNodes(); 1102 1101 return all ? forallMatch(nodes) : existsMatch(nodes); … … 1135 1134 @Override 1136 1135 protected Bounds getBounds() { 1136 if (Main.map == null || Main.map.mapView == null) { 1137 return null; 1138 } 1137 1139 return Main.map.mapView.getRealBounds(); 1138 1140 }
Note:
See TracChangeset
for help on using the changeset viewer.