Ignore:
Timestamp:
2013-12-22T18:18:43+01:00 (12 years ago)
Author:
Don-vip
Message:

fix #9459 - initialize default center view of MapView to last download location, if any, instead of (0,0)

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java

    r6380 r6509  
    3131import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
    3232import org.openstreetmap.josm.gui.dialogs.ValidatorDialog.ValidatorBoundingXYVisitor;
     33import org.openstreetmap.josm.gui.download.DownloadDialog;
    3334import org.openstreetmap.josm.gui.layer.Layer;
    3435import org.openstreetmap.josm.tools.Shortcut;
     
    244245        }
    245246        else if (mode.equals("download")) {
    246             if (!Main.pref.get("osm-download.bounds").isEmpty()) {
     247            Bounds bounds = DownloadDialog.getSavedDownloadBounds();
     248            if (bounds != null) {
    247249                try {
    248                     v.visit(new Bounds(Main.pref.get("osm-download.bounds"), ";"));
     250                    v.visit(bounds);
    249251                } catch (Exception e) {
    250                     e.printStackTrace();
     252                    Main.warn(e);
    251253                }
    252254            }
  • trunk/src/org/openstreetmap/josm/actions/DownloadAction.java

    r6380 r6509  
    2626 */
    2727public class DownloadAction extends JosmAction {
     28   
     29    /**
     30     * Constructs a new {@code DownloadAction}.
     31     */
    2832    public DownloadAction() {
    2933        super(tr("Download from OSM..."), "download", tr("Download map data from the OSM server."),
  • trunk/src/org/openstreetmap/josm/actions/NewAction.java

    r6380 r6509  
    1313import org.openstreetmap.josm.tools.Shortcut;
    1414
     15/**
     16 * Creates a blank new OSM data layer.
     17 * @since 169
     18 */
    1519public class NewAction extends JosmAction {
    1620
     21    /**
     22     * Constructs a {@code NewAction}.
     23     */
    1724    public NewAction() {
    1825        super(tr("New Layer"), "new", tr("Create a new map layer."),
Note: See TracChangeset for help on using the changeset viewer.