Ignore:
Timestamp:
2014-08-19T15:59:51+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #10388 - Incomplete download of relation members

File:
1 edited

Legend:

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

    r6973 r7432  
    2929import org.xml.sax.SAXException;
    3030
     31/**
     32 * Task downloading a set of OSM primitives.
     33 * @since 4081
     34 */
    3135public class DownloadPrimitivesTask extends PleaseWaitRunnable {
    3236    private DataSet ds;
     
    4347
    4448    /**
    45      * Creates the  task
     49     * Constructs a new {@code DownloadPrimitivesTask}.
    4650     *
    4751     * @param layer the layer in which primitives are updated. Must not be null.
     
    5761
    5862    /**
    59      * Creates the  task
     63     * Constructs a new {@code DownloadPrimitivesTask}.
    6064     *
    6165     * @param layer the layer in which primitives are updated. Must not be null.
     
    6872     */
    6973    public DownloadPrimitivesTask(OsmDataLayer layer, List<PrimitiveId> ids, boolean fullRelation,
    70             ProgressMonitor progessMonitor) throws IllegalArgumentException {
    71         super(tr("Download objects"), progessMonitor, false /* don't ignore exception */);
     74            ProgressMonitor progressMonitor) throws IllegalArgumentException {
     75        super(tr("Download objects"), progressMonitor, false /* don't ignore exception */);
    7276        ensureParameterNotNull(layer, "layer");
    7377        this.ids = ids;
     
    151155            for (Relation r : ds.getRelations()) {
    152156                if (canceled) return;
    153                 if (r.hasIncompleteMembers()) {
     157                // Relations may be incomplete in case of nested relations if child relations are accessed before their parent
     158                // (it may happen because "relations" has no deterministic sort order, see #10388)
     159                if (r.isIncomplete() || r.hasIncompleteMembers()) {
    154160                    synchronized(this) {
    155161                        if (canceled) return;
Note: See TracChangeset for help on using the changeset viewer.