Changeset 12182 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-05-15T19:29:29+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/FollowLineAction.java
r10413 r12182 121 121 // "viewport following" mode for tracing long features 122 122 // from aerial imagery or GPS tracks. 123 if ( Main.map.mapView.viewportFollowing) {123 if (DrawAction.VIEWPORT_FOLLOWING.get()) { 124 124 Main.map.mapView.smoothScrollTo(newPoint.getEastNorth()); 125 125 } -
trunk/src/org/openstreetmap/josm/actions/ViewportFollowToggleAction.java
r10453 r12182 9 9 10 10 import org.openstreetmap.josm.Main; 11 import org.openstreetmap.josm.actions.mapmode.DrawAction; 11 12 import org.openstreetmap.josm.tools.Shortcut; 12 13 … … 36 37 public void actionPerformed(ActionEvent e) { 37 38 toggleSelectedState(e); 38 Main.map.mapView.viewportFollowing = isSelected();39 DrawAction.VIEWPORT_FOLLOWING.put(isSelected()); 39 40 notifySelectedState(); 40 41 } -
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r12158 r12182 74 74 public class DrawAction extends MapMode implements MapViewPaintable, SelectionChangedListener, KeyPressReleaseListener, ModifierListener { 75 75 76 /** 77 * If this property is set, the draw action moves the viewport when adding new points. 78 * @since 12182 79 */ 80 public static final CachingProperty<Boolean> VIEWPORT_FOLLOWING = new BooleanProperty("draw.viewport.following", false).cached(); 81 76 82 private static final Color ORANGE_TRANSPARENT = new Color(Color.ORANGE.getRed(), Color.ORANGE.getGreen(), Color.ORANGE.getBlue(), 128); 77 83 … … 614 620 // "viewport following" mode for tracing long features 615 621 // from aerial imagery or GPS tracks. 616 if ( Main.map.mapView.viewportFollowing) {622 if (VIEWPORT_FOLLOWING.get()) { 617 623 Main.map.mapView.smoothScrollTo(n.getEastNorth()); 618 624 } -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r12174 r12182 36 36 37 37 import org.openstreetmap.josm.Main; 38 import org.openstreetmap.josm.actions.mapmode.DrawAction; 38 39 import org.openstreetmap.josm.actions.mapmode.MapMode; 39 40 import org.openstreetmap.josm.data.Bounds; … … 184 185 } 185 186 187 /** 188 * Replaced by the {@link DrawAction#VIEWPORT_FOLLOWING} property 189 * @deprecated since 12180. Can be remove soon (does any plugin even use this?) 190 */ 191 @Deprecated 186 192 public boolean viewportFollowing; 187 193
Note:
See TracChangeset
for help on using the changeset viewer.