Changeset 5648 in josm


Ignore:
Timestamp:
2012-12-30T17:41:20+01:00 (9 years ago)
Author:
Don-vip
Message:

fix #8307 - Do not suggest potential imagery sources on "update data"

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

Legend:

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

    r5486 r5648  
    246246            rememberDownloadedData(dataSet);
    247247            int numDataLayers = getNumDataLayers();
     248            boolean isUpdateData = false;
    248249            if (newLayer || numDataLayers == 0 || (numDataLayers > 1 && getEditLayer() == null)) {
    249250                // the user explicitly wants a new layer, we don't have any layer at all
     
    265266                    targetLayer = getFirstDataLayer();
    266267                }
     268                isUpdateData = targetLayer.data.getDataSourceArea().contains(currentBounds.asRect());
    267269                targetLayer.mergeFrom(dataSet);
    268270                computeBboxAndCenterScale();
     
    270272            }
    271273
    272             suggestImageryLayers();
     274            // Suggest potential imagery data, except if the data is downloaded after a "data update" command (see #8307)
     275            if (!isUpdateData) {
     276                suggestImageryLayers();
     277            }
    273278        }
    274279       
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskList.java

    r5059 r5648  
    5050     * Downloads a list of areas from the OSM Server
    5151     * @param newLayer Set to true if all areas should be put into a single new layer
    52      * @param The List of Rectangle2D to download
     52     * @param rects The List of Rectangle2D to download
     53     * @param progressMonitor The progress monitor
     54     * @return The Future representing the asynchronous download task
    5355     */
    5456    public Future<?> download(boolean newLayer, List<Rectangle2D> rects, ProgressMonitor progressMonitor) {
     
    8486     * Downloads a list of areas from the OSM Server
    8587     * @param newLayer Set to true if all areas should be put into a single new layer
    86      * @param The Collection of Areas to download
     88     * @param areas The Collection of Areas to download
     89     * @param progressMonitor The progress monitor
     90     * @return The Future representing the asynchronous download task
    8791     */
    8892    public Future<?> download(boolean newLayer, Collection<Area> areas, ProgressMonitor progressMonitor) {
Note: See TracChangeset for help on using the changeset viewer.