Changeset 9976 in josm
- Timestamp:
- 2016-03-13T00:38:12+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/BBox.java
r9372 r9976 153 153 */ 154 154 public boolean bounds(BBox b) { 155 if (!(xmin <= b.xmin) || 156 !(xmax >= b.xmax) || 157 !(ymin <= b.ymin) || 158 !(ymax >= b.ymax)) 159 return false; 160 return true; 155 return xmin <= b.xmin && xmax >= b.xmax 156 && ymin <= b.ymin && ymax >= b.ymax; 161 157 } 162 158 … … 167 163 */ 168 164 public boolean bounds(LatLon c) { 169 if ((xmin <= c.lon()) && 170 (xmax >= c.lon()) && 171 (ymin <= c.lat()) && 172 (ymax >= c.lat())) 173 return true; 174 return false; 165 return xmin <= c.lon() && xmax >= c.lon() 166 && ymin <= c.lat() && ymax >= c.lat(); 175 167 } 176 168 -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r9954 r9976 1323 1323 * @param osm node to check 1324 1324 * @param p point clicked 1325 * @param use _selected whether to prefer selected nodes1325 * @param useSelected whether to prefer selected nodes 1326 1326 * @return true, if the node fulfills the properties of the function body 1327 1327 */ 1328 private boolean isPrecedenceNode(Node osm, Point p, boolean use _selected) {1328 private boolean isPrecedenceNode(Node osm, Point p, boolean useSelected) { 1329 1329 if (osm != null) { 1330 if ( !(p.distanceSq(getPoint2D(osm)) > (4)*(4))) return true;1330 if (p.distanceSq(getPoint2D(osm)) <= (4*4)) return true; 1331 1331 if (osm.isTagged()) return true; 1332 if (use _selected && osm.isSelected()) return true;1332 if (useSelected && osm.isSelected()) return true; 1333 1333 } 1334 1334 return false; -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java
r9078 r9976 243 243 244 244 private static DefaultTableModel getTableModel(final CacheAccess<String, BufferedImageCacheEntry> cache) { 245 final DefaultTableModel tableModel =new DefaultTableModel(245 return new DefaultTableModel( 246 246 getCacheStats(cache), 247 247 new String[]{tr("Cache name"), tr("Object Count"), tr("Clear")}) { … … 251 251 } 252 252 }; 253 return tableModel;254 253 } 255 254 }
Note:
See TracChangeset
for help on using the changeset viewer.