Ignore:
Timestamp:
2018-02-24T18:58:28+01:00 (6 years 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/gui/layer/MainLayerManager.java

    r13437 r13453  
    376376     */
    377377    public synchronized OsmDataLayer getEditLayer() {
    378         if (dataLayer != null && !dataLayer.isReadOnly())
     378        if (dataLayer != null && !dataLayer.isLocked())
    379379            return dataLayer;
    380380        else
     
    402402     */
    403403    public synchronized DataSet getEditDataSet() {
    404         if (dataLayer != null && !dataLayer.isReadOnly()) {
     404        if (dataLayer != null && !dataLayer.isLocked()) {
    405405            return dataLayer.data;
    406406        } else {
     
    509509        GuiHelper.assertCallFromEdt();
    510510        layer.setUploadInProgress();
    511         layer.setReadOnly();
     511        layer.lock();
    512512
    513513        // Reset only the edit layer as empty
     
    528528    public synchronized void processLayerAfterUpload(OsmDataLayer layer) {
    529529        GuiHelper.assertCallFromEdt();
    530         layer.unsetReadOnly();
     530        layer.unlock();
    531531        layer.unsetUploadInProgress();
    532532
Note: See TracChangeset for help on using the changeset viewer.