Ignore:
Timestamp:
2018-03-03T17:59:48+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #8039, see #10456 - fix bugs with non-downloadable layers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowserModel.java

    r12657 r13486  
    88
    99import org.openstreetmap.josm.data.osm.DataSet;
     10import org.openstreetmap.josm.data.osm.DataSet.DownloadPolicy;
    1011import org.openstreetmap.josm.data.osm.Relation;
    1112import org.openstreetmap.josm.data.osm.RelationMember;
     
    3536    }
    3637
     38    /**
     39     * Sets the relation.
     40     * @param relation the relation
     41     */
    3742    public void setRelation(Relation relation) {
    3843        this.relation = relation;
     
    6267    }
    6368
     69    /**
     70     * Populates the model with parent referrers.
     71     * @param parents parent referrers
     72     */
    6473    public void populate(List<Relation> parents) {
    6574        referrers.clear();
     
    93102    }
    94103
     104    /**
     105     * Determines if reloading the relation is possible/authorized.
     106     * @return {@code true} if reloading the relation is possible/authorized
     107     */
    95108    public boolean canReload() {
    96         return relation != null && !relation.isNew();
     109        return relation != null && !relation.isNew()
     110                && !relation.getDataSet().isLocked()
     111                && !DownloadPolicy.BLOCKED.equals(relation.getDataSet().getDownloadPolicy());
    97112    }
    98113
     114    /**
     115     * Returns the relation.
     116     * @return the relation
     117     */
    99118    public Relation getRelation() {
    100119        return relation;
Note: See TracChangeset for help on using the changeset viewer.