Ignore:
Timestamp:
2011-10-07T21:50:14+02:00 (13 years ago)
Author:
simon04
Message:

fix #6542 - option to download relation without its members for "Download object" dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesTask.java

    r4191 r4497  
    3939
    4040    private OsmDataLayer layer;
     41    private boolean fullRelation;
    4142    private MultiFetchServerObjectReader multiObjectReader;
    4243    private OsmServerObjectReader objectReader;
     
    4849     * @param toUpdate a collection of primitives to update from the server. Set to
    4950     * the empty collection if null.
     51     * @param fullRelation true if a full download is required, i.e.,
     52     * a download including the immediate children of a relation.
    5053     * @throws IllegalArgumentException thrown if layer is null.
    5154     */
    52     public DownloadPrimitivesTask(OsmDataLayer layer, List<PrimitiveId>  ids) throws IllegalArgumentException {
     55    public DownloadPrimitivesTask(OsmDataLayer layer, List<PrimitiveId>  ids, boolean fullRelation) throws IllegalArgumentException {
    5356        super(tr("Download objects"), false /* don't ignore exception */);
    5457        ensureParameterNotNull(layer, "layer");
    5558        this.ids = ids;
    5659        this.layer = layer;
     60        this.fullRelation = fullRelation;
    5761    }
    5862
     
    145149                    synchronized(this) {
    146150                        if (canceled) return;
    147                         objectReader = new OsmServerObjectReader(r.getId(), OsmPrimitiveType.RELATION, true /* full */);
     151                        objectReader = new OsmServerObjectReader(r.getId(), OsmPrimitiveType.RELATION, fullRelation);
    148152                    }
    149153                    theirDataSet = objectReader.parseOsm(progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
Note: See TracChangeset for help on using the changeset viewer.