Changes between Initial Version and Version 1 of Ticket #12457, comment 5


Ignore:
Timestamp:
2016-01-31T13:59:42+01:00 (4 years ago)
Author:
simon04
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12457, comment 5

    initial v1  
    2727 
    2828     @Override
     29diff --git a/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java b/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
     30index 3ea58fc..1dd3f4b 100644
     31--- a/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
     32+++ b/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
     33@@ -520,10 +520,15 @@ public void cleanupAfterUpload(final Collection<IPrimitive> processed) {
     34 
     35         // if uploaded, clean the modified flags as well
     36         data.cleanupDeletedPrimitives();
     37-        for (OsmPrimitive p: data.allPrimitives()) {
     38-            if (processed.contains(p)) {
     39-                p.setModified(false);
     40+        data.beginUpdate();
     41+        try {
     42+            for (OsmPrimitive p : data.allPrimitives()) {
     43+                if (processed.contains(p)) {
     44+                    p.setModified(false);
     45+                }
     46             }
     47+        } finally {
     48+            data.endUpdate();
     49         }
     50     }
    2951}}}