private boolean parseURL(DownloadDialog gui) { Bounds b = OsmUrlToBounds.parse(tfOsmUrl.getText()); if (b == null) return false; gui.boundingBoxChanged(b, BoundingBoxSelection.this); updateBboxFields(b); updateUrl(b); return true; }
/** Restores the previous settings in the download dialog. */ public void restoreSettings() { cbDownloadOsmData.setSelected(Main.pref.getBoolean("download.osm", true)); cbDownloadGpxData.setSelected(Main.pref.getBoolean("download.gps", false)); cbNewLayer.setSelected(Main.pref.getBoolean("download.newlayer", false)); cbStartup.setSelected(isAutorunEnabled()); int idx = Main.pref.getInteger("download.tab", 0); if (idx < 0 || idx > tpDownloadAreaSelectors.getTabCount()) { idx = 0; } tpDownloadAreaSelectors.setSelectedIndex(idx); if (Main.isDisplayingMapView()) { MapView mv = Main.map.mapView; currentBounds = new Bounds(mv.getLatLon(0, mv.getHeight()), mv.getLatLon(mv.getWidth(), 0)); boundingBoxChanged(currentBounds, null); } else { Bounds bounds = getSavedDownloadBounds(); if (bounds != null) { currentBounds = bounds; boundingBoxChanged(currentBounds, null); } } }