Ignore:
Timestamp:
2018-02-24T18:58:28+01:00 (7 months ago)
Author:
Don-vip
Message:

fix #8039, fix #10456: final fixes for the read-only/locked layers:

  • rename "read-only" to "locked" (in XML and Java classes/interfaces)
  • add a new download policy (true/never) to allow private layers forbidding only to download data, but allowing everything else

This leads to:

  • normal layers: download allowed, modifications allowed, upload allowed
  • private layers: download allowed or not (download=true/never), modifications allowed, upload allowed or not (upload=true/discouraged/never)
  • locked layers: nothing allowed, the data cannot be modified in any way
File:
1 edited

Legend:

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

    r13434 r13453  
    350350    protected final void updateEnabledStateOnCurrentSelection(boolean allowReadOnly) {
    351351        DataSet ds = getLayerManager().getActiveDataSet();
    352         if (ds != null && (allowReadOnly || !ds.isReadOnly())) {
     352        if (ds != null && (allowReadOnly || !ds.isLocked())) {
    353353            updateEnabledState(ds.getSelected());
    354354        } else {
     
    366366    protected final void updateEnabledStateOnModifiableSelection(Collection<? extends OsmPrimitive> selection) {
    367367        setEnabled(selection != null && !selection.isEmpty()
    368                 && selection.stream().map(OsmPrimitive::getDataSet).noneMatch(DataSet::isReadOnly));
     368                && selection.stream().map(OsmPrimitive::getDataSet).noneMatch(DataSet::isLocked));
    369369    }
    370370
Note: See TracChangeset for help on using the changeset viewer.