Ignore:
Timestamp:
2018-02-18T21:33:30+01:00 (21 months ago)
Author:
Don-vip
Message:

fix #15969 - upload broken (regression from r13434)

File:
1 edited

Legend:

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

    r13392 r13440  
    220220        // partially uploaded. Better run on EDT.
    221221        Runnable r = () -> {
    222             layer.cleanupAfterUpload(processedPrimitives);
    223             layer.onPostUploadToServer();
    224             ChangesetCache.getInstance().update(changeset);
     222            boolean readOnly = layer.isReadOnly();
     223            if (readOnly) {
     224                layer.unsetReadOnly();
     225            }
     226            try {
     227                layer.cleanupAfterUpload(processedPrimitives);
     228                layer.onPostUploadToServer();
     229                ChangesetCache.getInstance().update(changeset);
     230            } finally {
     231                if (readOnly) {
     232                    layer.setReadOnly();
     233                }
     234            }
    225235        };
    226236
Note: See TracChangeset for help on using the changeset viewer.