Changeset 10742 in josm
- Timestamp:
- 2016-08-06T01:08:18+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r10687 r10742 885 885 return ((DrawAction) map.mapMode).getInProgressSelection(); 886 886 } else { 887 DataSet ds = get CurrentDataSet();887 DataSet ds = getLayerManager().getEditDataSet(); 888 888 if (ds == null) return null; 889 889 return ds.getSelected(); -
trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java
r9214 r10742 13 13 import org.openstreetmap.josm.Main; 14 14 import org.openstreetmap.josm.data.coor.LatLon; 15 import org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer; 15 16 import org.openstreetmap.josm.gui.layer.ImageryLayer; 16 17 … … 101 102 } 102 103 103 public static void bookmarkOffset(String name, ImageryLayer layer) {104 public static void bookmarkOffset(String name, AbstractTileSourceLayer layer) { 104 105 LatLon center; 105 106 if (Main.isDisplayingMapView()) { … … 110 111 OffsetBookmark nb = new OffsetBookmark( 111 112 Main.getProjection().toCode(), layer.getInfo().getName(), 112 name, layer.getD x(), layer.getDy(), center.lon(), center.lat());113 name, layer.getDisplaySettings().getDx(), layer.getDisplaySettings().getDy(), center.lon(), center.lat()); 113 114 for (ListIterator<OffsetBookmark> it = allBookmarks.listIterator(); it.hasNext();) { 114 115 OffsetBookmark b = it.next(); -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r10669 r10742 190 190 /** 191 191 * This class is an adapter for the old layer change interface. 192 * <p>193 * New implementations should use {@link org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener}194 192 * @author Michael Zangl 195 193 * @since 10271 196 */ 194 * @deprecated New implementations should use {@link org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener} 195 */ 196 @Deprecated 197 197 protected static class LayerChangeAdapter implements ActiveLayerChangeListener, LayerManager.LayerChangeListener { 198 198 … … 669 669 */ 670 670 public boolean isActiveLayerDrawable() { 671 return getEditLayer() != null;671 return layerManager.getEditLayer() != null; 672 672 } 673 673 … … 678 678 */ 679 679 public boolean isActiveLayerVisible() { 680 OsmDataLayer e = getEditLayer();680 OsmDataLayer e = layerManager.getEditLayer(); 681 681 return e != null && e.isVisible(); 682 682 } -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r10673 r10742 1246 1246 1247 1247 private LatLon getShiftedLatLon(EastNorth en) { 1248 return Main.getProjection().eastNorth2latlon(en.add(-getD x(), -getDy()));1248 return Main.getProjection().eastNorth2latlon(en.add(-getDisplaySettings().getDx(), -getDisplaySettings().getDy())); 1249 1249 } 1250 1250 -
trunk/src/org/openstreetmap/josm/tools/Utils.java
r10721 r10742 143 143 public static <T> boolean exists(Iterable<T> collection, Class<? extends T> clazz) { 144 144 CheckParameterUtil.ensureParameterNotNull(clazz, "clazz"); 145 return exists(collection,clazz::isInstance);145 return StreamUtils.toStream(collection).anyMatch(clazz::isInstance); 146 146 } 147 147
Note:
See TracChangeset
for help on using the changeset viewer.