Changeset 18017 in josm


Ignore:
Timestamp:
2021-07-14T16:37:05+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #21034 - remember download OSM bounds from DownloadOsmTask instead of DownloadDialog

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

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

    r17603 r18017  
    4545import org.openstreetmap.josm.io.OverpassDownloadReader;
    4646import org.openstreetmap.josm.io.UrlPatterns.OsmUrlPattern;
     47import org.openstreetmap.josm.spi.preferences.Config;
    4748import org.openstreetmap.josm.tools.Logging;
    4849import org.openstreetmap.josm.tools.Utils;
     
    214215    }
    215216
     217    protected final void rememberDownloadedBounds(Bounds bounds) {
     218        if (bounds != null) {
     219            Config.getPref().put("osm-download.bounds", bounds.encodeAsString(";"));
     220        }
     221    }
     222
    216223    /**
    217224     * Superclass of internal download task.
     
    506513            }
    507514
     515            rememberDownloadedBounds(currentBounds);
    508516            rememberDownloadedData(dataSet);
    509517            loadData(newLayerName, currentBounds);
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r17777 r18017  
    440440        downloadSourcesTab.getSelectedPanel().ifPresent(panel -> DOWNLOAD_SOURCE_TAB.put(panel.getSimpleName()));
    441441        DOWNLOAD_ZOOMTODATA.put(cbZoomToDownloadedData.isSelected());
    442         if (currentBounds != null) {
    443             Config.getPref().put("osm-download.bounds", currentBounds.encodeAsString(";"));
    444         }
    445442    }
    446443
Note: See TracChangeset for help on using the changeset viewer.